Skip to content

./hadrian/ghci compilation error that doesn't appear at build time.

Using the ./hadrian/ghci script, I am getting this error:

/home/hecate/Contrib/GHC/ghc/compiler/GHC/Utils/Misc.hs:1214:22: error:
     Could not deduce (Foldable t0) arising from a use of elem
      from the context: MonadFail m
        bound by the inferred type of
                   readExp :: MonadFail m => [Char] -> m (Int, [Char])
        at /home/hecate/Contrib/GHC/ghc/compiler/GHC/Utils/Misc.hs:(1214,6)-(1215,49)
      The type variable t0 is ambiguous
      These potential instances exist:
        instance Foldable (Either a) -- Defined in ‘Data.Foldable’
        instance Foldable Down -- Defined in ‘Data.Foldable’
        instance Foldable Proxy -- Defined in ‘Data.Foldable’
        ...plus six others
        ...plus 44 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
     In the expression: e `elem` "eE"
      In a stmt of a pattern guard for
                     an equation for readExp:
        e `elem` "eE"
      In an equation for readExp:
          readExp (e : s) | e `elem` "eE" = readExp' s
     |
1214 |      readExp (e:s) | e `elem` "eE" = readExp' s
     |                      ^^^^^^^^^^^^^

/home/hecate/Contrib/GHC/ghc/compiler/GHC/Utils/Misc.hs:1214:31: error:
     Could not deduce (IsString (t0 Char))
        arising from the literal "eE"
      from the context: MonadFail m
        bound by the inferred type of
                   readExp :: MonadFail m => [Char] -> m (Int, [Char])
        at /home/hecate/Contrib/GHC/ghc/compiler/GHC/Utils/Misc.hs:(1214,6)-(1215,49)
      The type variable t0 is ambiguous
      These potential instances exist:
        instance (a ~ Char) => IsString [a] -- Defined in ‘Data.String’
        ...plus two instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
     In the second argument of elem, namely "eE"
      In the expression: e `elem` "eE"
      In a stmt of a pattern guard for
                     an equation for readExp:
        e `elem` "eE"
     |
1214 |      readExp (e:s) | e `elem` "eE" = readExp' s
     |                               ^^^^
Failed, 28 modules loaded.
(13.35 secs,)

Being perfectly candid, isn't that the kind of things that are supposed to get caught in the CI?

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