Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GADT versus other Haskell options #396

Open
ScottFreeCode opened this issue Oct 23, 2021 · 1 comment
Open

GADT versus other Haskell options #396

ScottFreeCode opened this issue Oct 23, 2021 · 1 comment
Labels
Haskell/Functor Concerning the Haskell backend with --functor Haskell/GADT lexer Concerning the generated lexer
Milestone

Comments

@ScottFreeCode
Copy link

The GADT version of the Haskell backend does not appear to respect --text-token or --functor; I don't know GADTs well enough to know if the functor representation is possible (though it probably ought to warn it's ignoring the option, if it isn't possible), but the text option(s) should presumably be fixed if nothing else. If GADTs and Functors don't mix it would be nice to find an alternative means of getting position info in the GADT implementation as well.

(Personally I have, so far, gotten away with using the non-GADT Haskell backend. I'm exploring what difference it makes though.)

@andreasabel
Copy link
Member

The Haskell/GADT backend was implemented as a completely separate backend (likely starting with a clone of the Haskell backend). This was before my time as BNFC maintainer, and I do not understand the reasons why.
It could make sense to merge the Haskell and the Haskell/GADT backends so that they can again develop in lock-step, supporting the same options.
Personally, I have not used Haskell/GADT in my projects, but I know that @aarneranta does so and wants to keep it.
There is also development of BNFC 3 going on at the moment (not public yet); when porting backends to BNFC 3, there should and will be de-cloning whenever it makes sense.

@andreasabel andreasabel added Haskell/Functor Concerning the Haskell backend with --functor Haskell/GADT lexer Concerning the generated lexer labels Oct 24, 2021
@andreasabel andreasabel added this to the 3.0 milestone Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Haskell/Functor Concerning the Haskell backend with --functor Haskell/GADT lexer Concerning the generated lexer
Projects
None yet
Development

No branches or pull requests

2 participants