hint icon indicating copy to clipboard operation
hint copied to clipboard

GHC 9.4 compatibility

Open Zalastax opened this issue 2 years ago • 1 comments

GHC 9.4.1 release is being prepared. If I download the build from https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8583 (ghc-9.4.0.20220705), these are the errors I see:

Building library for hint-0.9.0.6..
[ 1 of 19] Compiling Control.Monad.Ghc ( src\Control\Monad\Ghc.hs, dist\build\Control\Monad\Ghc.o )

src\Control\Monad\Ghc.hs:22:1: warning: [-Wunused-imports]
    The qualified import of ‘GHC.Utils.Exception’ is redundant
      except perhaps to import instances from ‘GHC.Utils.Exception’
    To import instances alone, use: import GHC.Utils.Exception()
   |
22 | import qualified GHC.Utils.Exception as GHC
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\Control\Monad\Ghc.hs:38:3: warning: [-Wnoncanonical-monad-instances]
    Noncanonical ‘pure = return’ definition detected
    in the instance declaration for ‘Applicative (GhcT m)’.
    Move definition from ‘return’ to ‘pure’
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
   |
38 |   pure  = return
   |   ^^^^^^^^^^^^^^
[ 2 of 19] Compiling Hint.CompatPlatform ( src\Hint\CompatPlatform.hs, dist\build\Hint\CompatPlatform.o )

src\Hint\CompatPlatform.hs:25:1: warning: [-Wunsupported-calling-conventions]
    • the 'stdcall' calling convention is unsupported on this platform,
      treating as ccall
    • When checking declaration:
        foreign import stdcall unsafe "winbase.h GetCurrentProcessId" c_GetCurrentProcessId
          :: IO Word32
   |
25 | foreign import stdcall unsafe "winbase.h GetCurrentProcessId"
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
[ 3 of 19] Compiling Hint.GHC         ( src\Hint\GHC.hs, dist\build\Hint\GHC.o )

src\Hint\GHC.hs:47:36: error:
    Module ‘GHC.Types.TyThing.Ppr’ does not export ‘pprTypeForUser’
   |
47 | import GHC.Types.TyThing.Ppr as X (pprTypeForUser)
   |                                    ^^^^^^^^^^^^^^

src\Hint\GHC.hs:83:61: error:
    Module ‘GHC.Driver.Session’ does not export ‘WarnReason’
   |
83 | import GHC.Driver.Session as X (xFlags, xopt, FlagSpec(..), WarnReason(NoReason))
   |                                                             ^^^^^^^^^^^^^^^^^^^^

src\Hint\GHC.hs:133:48: error:
    Module ‘GHC.Parser.Errors.Ppr’ does not export ‘pprError’
    |
133 | import qualified GHC.Parser.Errors.Ppr as GHC (pprError)
    |                                                ^^^^^^^^

src\Hint\GHC.hs:134:43: error:
    Module ‘GHC.Parser.Lexer’ does not export ‘getErrorMessages’
    |
134 | import qualified GHC.Parser.Lexer as GHC (getErrorMessages)
    |                                           ^^^^^^^^^^^^^^^^

src\Hint\GHC.hs:135:42: error:
    Module ‘GHC.Types.Error’ does not export ‘ErrorMessages’
    |
135 | import qualified GHC.Types.Error as GHC (ErrorMessages, errMsgDiagnostic, unDecorated)
    |                                          ^^^^^^^^^^^^^
[12 of 19] Compiling Hint.Util        ( src\Hint\Util.hs, dist\build\Hint\Util.o )

Zalastax avatar Jul 07 '22 07:07 Zalastax

@christiaanb is working on this in #152

gelisam avatar Jul 30 '22 14:07 gelisam

Hey just a note that we're hoping on this for a tidalcycles hint binary release as we need a bugfix for windows that's in ghc 9.4.2.

yaxu avatar Dec 19 '22 18:12 yaxu

Fixed by #152

gelisam avatar Jun 15 '23 03:06 gelisam

hint-0.9.0.7 now supports ghc-9.4

gelisam avatar Jun 15 '23 19:06 gelisam