snack icon indicating copy to clipboard operation
snack copied to clipboard

ghc 8.4 compatibility

Open nh2 opened this issue 7 years ago • 0 comments

Before: https://hackage.haskell.org/package/ghc-8.2.2/docs/Lexer.html#t:ParseResult

PFailed SrcSpan MsgDoc

After: https://hackage.haskell.org/package/ghc-8.4.3/docs/Lexer.html#t:ParseResult

PFailed (DynFlags -> Messages) SrcSpan MsgDoc

/nix/store/018n3i2w7vcjwjp3nlfxa7af6fxsl9xh-Imports.hs:51:11: error:
    • The constructor ‘Lexer.PFailed’ should have 3 arguments, but has been given 2
    • In the pattern: Lexer.PFailed _ e
      In a case alternative:
          Lexer.PFailed _ e
            -> fail
                 $ unlines
                     ["Could not parse module: ", fp,
                      " because " <> Outputable.showSDocUnsafe e]
      In the second argument of ‘(>>=)’, namely
        ‘\case
           Lexer.POk _ (SrcLoc.L _ res) -> pure res
           Lexer.PFailed _ e
             -> fail $ unlines ["Could not parse module: ", fp, ....]’
   |
51 |           Lexer.PFailed _ e -> fail $ unlines
   |           ^^^^^^^^^^^^^^^^^

Fix

-          Lexer.PFailed _ e -> fail $ unlines
+          Lexer.PFailed _ _ e -> fail $ unlines

nh2 avatar Aug 30 '18 22:08 nh2