Git Product home page Git Product logo

Comments (11)

gridaphobe avatar gridaphobe commented on September 23, 2024
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.

pchickey avatar pchickey commented on September 23, 2024

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.

Hodapp87 avatar Hodapp87 commented on September 23, 2024

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.

bitemyapp avatar bitemyapp commented on September 23, 2024

@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

Cf. http://stackoverflow.com/questions/32899040/how-can-i-make-stack-call-happy-alex-and-other-build-tools

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.

Hodapp87 avatar Hodapp87 commented on September 23, 2024

@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.

tinkyholloway avatar tinkyholloway commented on September 23, 2024

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.

Hodapp87 avatar Hodapp87 commented on September 23, 2024

@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.

tinkyholloway avatar tinkyholloway commented on September 23, 2024

@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.

Hodapp87 avatar Hodapp87 commented on September 23, 2024

@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.

tinkyholloway avatar tinkyholloway commented on September 23, 2024

That worked just fine for me @Hodapp87. Nice.

from ivory.

leepike avatar leepike commented on September 23, 2024

Closing this---stack ghci works now. BTW, we may move to an alternate build system in the future.

from ivory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.