Code Monkey home page Code Monkey logo

Comments (8)

lexi-lambda avatar lexi-lambda commented on May 18, 2024 2

I’ve pushed a commit that links to my implementation branch in the README, but here’s a direct link as well: https://gitlab.haskell.org/lexi.lambda/ghc/-/commits/first-class-continuations

from eff.

turion avatar turion commented on May 18, 2024 2

@lexi-lambda Thanks! I'm working on it. Do all dependencies (including base) need to be rebuild with your GHC branch as well?

from eff.

layus avatar layus commented on May 18, 2024 1

I found a related, very complete article about patching GHC at https://mpickering.github.io/posts/2018-01-05-ghchead-nix.html

i would be glad to help you if you need someone to test, debug and possibly provide advice during your progress. Do you have any code somewhere ?

from eff.

lexi-lambda avatar lexi-lambda commented on May 18, 2024

Yes, but that isn’t really due to any particular property of my branch, I don’t think. To my knowledge, GHC doesn’t like it if you try to use any libraries compiled with other GHC versions, since there’s no guarantee they would be in any way compatible! So GHC demands that the compiler versions in the interface files match exactly, regardless of whether or not it would actually cause a problem.

from eff.

turion avatar turion commented on May 18, 2024

Sorry for the long break. I'm finding this difficult because it's not so straightforward to override a GHC source in nixpkgs correctly. If anyone knows how this works properly, do let me know.

from eff.

turion avatar turion commented on May 18, 2024

@layus Thank you, that's very kind! You can find my work-in-progress here: https://github.com/turion/eff/blob/dev_nix/default.nix

I read the article you posted. It's very informative. However, it only seems to answer how to apply certain patches to GHC HEAD, whereas I want to specify the complete source. I think I succeeded halfway, but I'm running into this error in stage 2:

compiler/stage2/build/GHC/Parser/Lexer.hs:3495:3: error:
    Variable not in scope: int16ToInt# :: Int# -> Int#
     |
3495 |   int16ToInt#
     |   ^^^^^^^^^^^

compiler/stage2/build/GHC/Parser/Lexer.hs:3520:3: error:
    Variable not in scope: int32ToInt# :: Int# -> Int#
     |
3520 |   int32ToInt#
     |   ^^^^^^^^^^^

Possibly, this is a real build error, and not an error in my setup. I'm not sure.

from eff.

layus avatar layus commented on May 18, 2024

The problem you encounter is described here. Not too sure how to dowgrade alex, or merge ghc upstream patches in there. but either should solve the issue.

https://www.mail-archive.com/[email protected]/msg19126.html

from eff.

layus avatar layus commented on May 18, 2024

@layus Thank you, that's very kind! You can find my work-in-progress here: https://github.com/turion/eff/blob/dev_nix/default.nix

I read the article you posted. It's very informative. However, it only seems to answer how to apply certain patches to GHC HEAD, whereas I want to specify the complete source.

But you can always convert the ghc/eff branch to a patch and apply that cleanly on top of any compatible ghc version. It should work on top of ghcHead and avoid the above issue altogether.

from eff.

Related Issues (14)

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.