Skip to content

Hadrian can no longer build GHC 8.6.5

To do some special debugging I wanted to buid GHC 8.6.5 with hadrian. With GHC 8.6.3 as my default compiler I did:

It tells me:

Resolving dependencies...
Build profile: -w ghc-8.6.3 -O1
In order, the following will be built (use -v for more details):
 - Cabal-2.4.0.1 (lib) (first run)
 - hadrian-0.1.0.0 (exe:hadrian) (first run)
Configuring library for Cabal-2.4.0.1..
Preprocessing library for Cabal-2.4.0.1..

Then it builds Cabal from

[  1 of 220] Compiling Distribution.Compat.Binary
...
[220 of 220] Compiling Distribution.Simple

Then it starts building hadrian

Configuring executable 'hadrian' for hadrian-0.1.0.0..
Preprocessing executable 'hadrian' for hadrian-0.1.0.0..
Building executable 'hadrian' for hadrian-0.1.0.0..
[ 1 of 87] Compiling Environment
...
[34 of 87] Compiling Expression

where it fails with:

src/Expression.hs:37:3: error:
    • No instance for (Control.Monad.Fail.MonadFail
                         (Hadrian.Expression.Expr Context Builder))
        arising from a do statement
        with the failable pattern ‘Just cabal’
    • In a stmt of a 'do' block:
        Just cabal <- expr (readPackageDataFile ctx)
      In the expression:
        do ctx <- getContext
           Just cabal <- expr (readPackageDataFile ctx)
           return $ key cabal
      In an equation for ‘getPackageData’:
          getPackageData key
            = do ctx <- getContext
                 Just cabal <- expr (readPackageDataFile ctx)
                 return $ key cabal
   |
37 |   Just cabal <- expr (readPackageDataFile ctx)
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Hadrian should be able to build previous GHC versions:

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information