Comments (11)
Warning: ignoring unrecognised input `/home/hodapp/source/ivory/ivory/src/Ivory/Language/Syntax/Concrete/Lexer.x'
Warning: ignoring unrecognised input `/home/hodapp/source/ivory/ivory/src/Ivory/Language/Syntax/Concrete/Parser.y'
You probably need to use cabal repl
(or manually run happy and alex to generate the parser). I suspect stack ghci
has a flag that would tell it to start a cabal repl
instead of a plain ghci
, but I've never used stack personally.
from ivory.
We haven't tried using stack for building any Ivory related code, so unfortunately I can't offer any help with this. If you do figure out how to get it to work, we'd appreciate hearing your results, and we would accept any patches required.
from ivory.
Sure, @pchickey. I can tell you that Ivory already builds just fine in stack and various different resolvers (and if I get past this issue, I'll commit the stack.yaml that I use), but I'm not sure if the tests run right, and that might be related.
from ivory.
@Hodapp87 @pchickey having tested language-python
, it appears the Cabal file for ivory
is incomplete.
Contrast with https://github.com/bjpop/language-python/blob/master/language-python.cabal
This should rectify it, ping me if it doesn't. I couldn't completely test it with language-python because my machine is overloaded at the moment.
from ivory.
@bitemyapp, this seems to get further, but develops other problems (I stuck a log of the latest one in https://raw.githubusercontent.com/Hodapp87/ivory/stack-ghci/ivory-wtf.txt). This may be related to commercialhaskell/stack#970.
from ivory.
Using the stack.yaml
from @Hodapp87 as a starting point, I was able to build a project with stack
and use ghci
. Below is my stack.yaml
. I need to first
$ stack install happy
$ stack install alex
then
$ stack build
watch a lot of warnings about the changes to the Prelude
re Applicative
and Monoid
wizz by, and then
$ stack ghci <projectname>:exe:<executablename>
Here is my stack.yaml
:
flags: {}
packages:
- '.'
- location:
git: https://github.com/GaloisInc/ivory.git
commit: 7ecea5839898b65430ca298fd1f3af4d2272e3fb
subdirs:
- ivory-artifact
- ivory-backend-c
- ivory-eval
- ivory-examples
- ivory-hw
- ivory-model-check
- ivory-opts
- ivory-quickcheck
- ivory-serialize
- ivory-stdlib
- ivory
extra-deps:
- happy-1.19.5
- alex-3.1.4
- ghc-srcspan-plugin-0.2.1.0
resolver: lts-3.7
from ivory.
@tinkyholloway, thanks for the information. It looks like this was using Ivory as a dependency rather than using stack for Ivory itself, but it should work just the same. I'll have to try something similar.
Did this incorporate the handful of .cabal file changes that I had in master...Hodapp87:stack-build? If so, then I wonder why manually installing alex & happy was necessary.
from ivory.
@Hodapp87, yes this is using ivory
as a dependency. The project being built here is just the example in the tutorial (with the necessary API change to compile
).
I made no changes to ivory
code anywhere.
I also cannot explain why happy
and alex
needed to be built separately. Without doing so later phases in the build process for ivory
complained that they could not find the happy
/alex
executables. The easiest thing for me to do was to do what I did. I'm no stack
expert.
from ivory.
@tinkyholloway, could you try pointing to https://github.com/Hodapp87/ivory/tree/stack-build (it's probably just the .cabal file that matters), get rid of alex & happy from your extra-deps and from what you install manually, and see if this works? I'm able to get a REPL in my own project similarly.
from ivory.
That worked just fine for me @Hodapp87. Nice.
from ivory.
Closing this---stack ghci
works now. BTW, we may move to an alternate build system in the future.
from ivory.
Related Issues (20)
- Invalid code generated: initialization discards βconstβ qualifier from pointer target type HOT 9
- Hackage build failed HOT 4
- The documentation for the latest version of this package is missing on Hackage. HOT 2
- Question: Using "Simple" Sum Types in Ivory HOT 2
- Why `deref` is effectful? HOT 7
- Add support for template-haskell-2.12 HOT 1
- Constant assertions
- Remove `IvoryZero` constraint from `ifte` and `cond`
- Travis entry for 7.10 looks invalid
- http://ivorylang.org seems down HOT 1
- How to actually run the tutorial? HOT 1
- ivory-backend-acl2 can not work
- Incompatibility with newer versions of base-compat and monadLib HOT 1
- The documentation for the latest version of `ivory-backend-c` is missing on Hackage. HOT 3
- ProcPtrs and Refs in MemAreas
- Remove noop casts in the C code HOT 4
- Finish/integrate new model-checker
- Generalize Ivory memory model
- Ivory module system improvements
- cvc4 errors in local test HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ivory.