Nothing Special   »   [go: up one dir, main page]

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

Both xml PrettyPrinters not compiling with Haskell-Gadt backend #170

Closed
pascalh opened this issue Feb 28, 2016 · 1 comment
Closed

Both xml PrettyPrinters not compiling with Haskell-Gadt backend #170

pascalh opened this issue Feb 28, 2016 · 1 comment

Comments

@pascalh
Copy link
Contributor
pascalh commented Feb 28, 2016

I wanted to use the Gadt backend together with a Xml-PrettyPrinter, but I got the following error:

cat Calc.cf ; bnfc --haskell-gadt --xml -m Calc.cf ; make

-- file Calc.bnfc
EAdd.   Exp ::= Exp "+" Exp1    ;
ESub.   Exp ::= Exp "-" Exp1    ;
EMul.   Exp1    ::= Exp1    "*" Exp2    ;
EDiv.   Exp1    ::= Exp1    "/" Exp2    ;
EInt.   Exp2    ::= Integer ;
coercions   Exp 2   ;

8 rules accepted

   (Use Alex 3.0 to compile.)
   (Tested with Happy 1.15)
writing new file ./AbsCalc.hs
writing new file ./ComposOp.hs
writing new file ./LexCalc.x
writing new file ./ParCalc.y
writing new file ./SkelCalc.hs
writing new file ./PrintCalc.hs
writing new file ./TestCalc.hs
writing new file ./ErrM.hs
writing new file ./Makefile
writing new file ./Calc.dtd
writing new file ./XMLCalc.hs
happy -gca ParCalc.y
alex -g LexCalc.x
ghc --make TestCalc.hs -o TestCalc
[1 of 9] Compiling ComposOp         ( ComposOp.hs, ComposOp.o )
[2 of 9] Compiling ErrM             ( ErrM.hs, ErrM.o )
[3 of 9] Compiling AbsCalc          ( AbsCalc.hs, AbsCalc.o )
[4 of 9] Compiling XMLCalc          ( XMLCalc.hs, XMLCalc.o )

XMLCalc.hs:43:10:
    Illegal instance declaration for ‘XPrint Exp’
      (All instance types must be of the form (T t1 ... tn)
       where T is not a synonym.
       Use TypeSynonymInstances if you want to disable this.)
    In the instance declaration for ‘XPrint Exp’
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1

It is actually the same error when using the other xml encoding --xmlt.

I have already solved this issue, but I wanted to report it here for documentation and to enable referencing it in a regression test.

@gdetrez
Copy link
Contributor
gdetrez commented Sep 2, 2016

Fixed by @pascalh in pull request #171

@gdetrez gdetrez closed this as completed Sep 2, 2016
@andreasabel andreasabel added this to the 2.8.2 milestone Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants