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

Support for ghc-8.10.1 #305

Closed
wants to merge 6 commits into from
Closed

Support for ghc-8.10.1 #305

wants to merge 6 commits into from

Conversation

jneira
Copy link
Contributor

@jneira jneira commented May 13, 2020

  • WIP, it does not compile:
13 of 32] Compiling Language.Haskell.Brittany.Internal.ExactPrintUtils ( src\Language\Haskell\Brittany\Internal\ExactPrintUtils.hs, D:\\dev\ws\haskell\brittany\dist-newstyle\build\x86_64-windows\ghc-8.10.1\brittany-0.12.1.1\build\Language\Haskell\Brittany\Internal\ExactPrintUtils.o )

src\Language\Haskell\Brittany\Internal\ExactPrintUtils.hs:101:9: error:
    • Couldn't match type ‘Bag.Bag ErrUtils.ErrMsg’ with ‘(a1, [Char])’
      Expected type: Either
                       (a1, [Char]) (ExactPrint.Anns, GHC.ParsedSource)
        Actual type: Either
                       ErrUtils.ErrorMessages (ExactPrint.Anns, GHC.ParsedSource)
    • In the second argument of ‘($)’, namely
        ‘ExactPrint.postParseTransform res opts’
      In a stmt of a 'do' block:
        either
          (\ (span, err) -> ExceptT.throwE $ show span ++ ": " ++ err)
          (\ (a, m) -> pure (a, m, x))
          $ ExactPrint.postParseTransform res opts
      In the second argument of ‘($)’, namely
        ‘do dflags0 <- lift $ GHC.getSessionDynFlags
            (dflags1, leftover, warnings) <- lift
                                               $ GHC.parseDynamicFlagsCmdLine
                                                   dflags0
                                                   (GHC.noLoc <$> ("-hide-all-packages" : args))
            void $ lift $ GHC.setSessionDynFlags dflags1
            dflags2 <- lift $ ExactPrint.initDynFlags fp
            ....’
    |
101 |       $ ExactPrint.postParseTransform res opts
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\Language\Haskell\Brittany\Internal\ExactPrintUtils.hs:132:13: error:
    • Couldn't match type ‘(a0, [Char])’ with ‘Bag.Bag ErrUtils.ErrMsg’
      Expected type: ErrUtils.ErrorMessages
        Actual type: (a0, [Char])
    • In the pattern: (span, err)
      In the pattern: Left (span, err)
      In a case alternative:
          Left (span, err)
            -> ExceptT.throwE $ showOutputable span ++ ": " ++ err
    |
132 |       Left  (span, err) -> ExceptT.throwE $ showOutputable span ++ ": " ++ err

@infinity0
Copy link
Contributor

I've made it compile here in commit infinity0@0807fc9 and it seems to work fine. Not entirely sure about my fixes though:

  • the new way of showing error messages that I'm doing is pretty hacky, perhaps there is a better way
  • not sure I dealt with qualified imports correctly, in Import.hs

Everything else should be pretty reasonable.

cabal.project Outdated Show resolved Hide resolved
jneira and others added 2 commits August 6, 2020 12:24
Only data-tree-print is needed now

Co-authored-by: Luke Lau <luke_lau@icloud.com>
@lukel97
Copy link
Contributor

lukel97 commented Aug 6, 2020

@jneira Any chance I could get push access to this branch? I've rebased it and got it building on ghc-8.8

@jneira
Copy link
Contributor Author

jneira commented Aug 6, 2020

@bubba sure, feel free to open a new pr or alternatively you can do a pr against my branch

@jneira
Copy link
Contributor Author

jneira commented Aug 6, 2020

Superseded by #312

@jneira jneira closed this Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants