Skip to content

GHC master fails to build with alex 3.5.1.0

Summary

Upgrading to Alex 3.5.1.0 makes compilation of GHC on master fail because of 7dfdf3d9 (cc @hsyl20)

compiler/GHC/Parser/Lexer.x:2871:20: error: [GHC-88464]
    Data constructor not in scope: C# :: t0 -> Char
    Suggested fixes:
      • Perhaps use one of these:
          ‘GHC.Exts.C#’ (imported from GHC.Exts),
          ‘GHC.Exts.D#’ (imported from GHC.Exts),
          ‘GHC.Exts.F#’ (imported from GHC.Exts)
      • Add ‘C#’ to the import list in the import of ‘GHC.Exts’
        (at _build/stage0/compiler/build/GHC/Parser/Lexer.hs:100:1-202).
     |
2871 |
     |                    ^^

compiler/GHC/Parser/Lexer.x:2871:24: error: [GHC-88464]
    Variable not in scope: chr# :: Int# -> t0
    Suggested fixes:
      • Perhaps use one of these:
          ‘GHC.Exts.chr#’ (imported from GHC.Exts),
          ‘chr’ (imported from Data.Char)
      • Add ‘chr#’ to the import list in the import of ‘GHC.Exts’
        (at _build/stage0/compiler/build/GHC/Parser/Lexer.hs:100:1-202).
     |
2871 |
     |                        ^^^^

Steps to reproduce

Try building master with alex 3.5.1.0

Environment

  • GHC version used: 9.8.2, alex 3.5.1.0

Solution

It seems to be sufficient to qualify the names with GHC.Exts

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