haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

src/Language/Haskell/Exts/InternalParser.hs does not compile #406

Closed iphydf closed 6 years ago

iphydf commented 6 years ago

The InternalParser.hs file in the source package does not compile.

The .ly file needs to be compiled with happy -gc (or -agc), otherwise you get a syntax error when compiling the .hs file:

src/Language/Haskell/Exts/InternalParser.hs:2050:1: error:
    parse error (possibly incorrect indentation or mismatched brackets)
     |
2050 | (CompletePragma (happy_var_1 <^^> happy_var_4 <** ([happy_var_1] ++ fst happy_var_2 ++ com ++ [happy_var_4])) (snd happy_var_2) ts)
     | ^
mpickering commented 6 years ago

Why are you trying to compile that file?

iphydf commented 6 years ago

To avoid https://github.com/tweag/rules_haskell/issues/101. Why does the source tarball contain a file that doesn't compile?

mpickering commented 6 years ago

I think this is a packaging mistake sorry. By default, cabal sdist doesn't include the generate files in the tarballs. You should generate them using happy.