haskell / happy

The Happy parser generator for Haskell
Other
276 stars 84 forks source link

Apply failP changes to .hs files used for bootstrap #140

Closed vmchale closed 5 years ago

vmchale commented 5 years ago

I believe this fixes https://github.com/simonmar/happy/issues/139

As of now, the latest happy tarball release will not build with GHC 8.8.1

bgamari commented 5 years ago

Has this made it into a release yet, @simonmar?

simonmar commented 5 years ago

Nope, do we need another release?

vmchale commented 5 years ago

Currently, running

cabal unpack happy
cd happy-1.19.10/
cabal new-build -w ghc-8.8.1

fails with

Resolving dependencies...
Build profile: -w ghc-8.8.0.20190424 -O1
In order, the following will be built (use -v for more details):
 - happy-1.19.10 (exe:happy) (first run)
[1 of 1] Compiling Main             ( /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/setup/setup.hs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/setup/Main.o )

/home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/setup/setup.hs:48:22: warning: [-Wdeprecations]
    In the use of ‘rawSystemProgramConf’
    (imported from Distribution.Simple.Program):
    Deprecated: "use runDbProgram instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)."
   |
48 |   let runProgram p = rawSystemProgramConf (fromFlagOrDefault normal (buildVerbosity flags))
   |                      ^^^^^^^^^^^^^^^^^^^^
Linking /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/setup/setup ...
Configuring happy-1.19.10...
Preprocessing executable 'happy' for happy-1.19.10..
Building executable 'happy' for happy-1.19.10..
[ 1 of 19] Compiling AbsSyn           ( src/AbsSyn.lhs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/AbsSyn.o )
[ 2 of 19] Compiling GenUtils         ( src/GenUtils.lhs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/GenUtils.o )
[ 3 of 19] Compiling NameSet          ( src/NameSet.hs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/NameSet.o )
[ 4 of 19] Compiling ParamRules       ( src/ParamRules.hs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/ParamRules.o )
[ 5 of 19] Compiling ParseMonad       ( src/ParseMonad.hs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/ParseMonad.o )
[ 6 of 19] Compiling Lexer            ( src/Lexer.lhs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/Lexer.o )
[ 7 of 19] Compiling AttrGrammar      ( src/AttrGrammar.lhs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/AttrGrammar.o )
[ 8 of 19] Compiling AttrGrammarParser ( src/AttrGrammarParser.hs, /home/vanessa/git-builds/junk/happy-1.19.10/dist-newstyle/build/x86_64-linux/ghc-8.8.0.20190424/happy-1.19.10/build/happy/happy-tmp/AttrGrammarParser.o )

src/AttrGrammarParser.hs:342:14: error:
    • No instance for (MonadFail (Either String))
        arising from a use of ‘fail’
    • In the expression: fail ("Parse error\n")
      In an equation for ‘happyError’:
          happyError = fail ("Parse error\n")
    |
342 | happyError = fail ("Parse error\n")
    |              ^^^^^^^^^^^^^^^^^^^^^^

...which this was intended to fix. So a new release is necessary for GHC 8.8.1 compatibility at least.