Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,830
    • Issues 4,830
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 447
    • Merge requests 447
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18620

Closed
Open
Created Aug 29, 2020 by Ryan Scott@RyanGlScottMaintainer

Cannot build ghc-9.0 branch (or older GHC branches) with happy-1.20.0

Attempting to build the ghc-9.0 branch (at commit 5ccf44c6) using happy-1.20.0 yields the following errors:

[525 of 543] Compiling GHC.Cmm.Parser   ( /home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs, nothing )

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:477:24: error:
    Not in scope: ‘Prelude.*’
    No module named ‘Prelude’ is imported.
    |
477 |         bit_start = st Prelude.* 134
    |                        ^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:478:23: error:
    Not in scope: ‘Prelude.+’
    No module named ‘Prelude’ is imported.
    |
478 |         bit_end = (st Prelude.+ 1) Prelude.* 134
    |                       ^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:478:36: error:
    Not in scope: ‘Prelude.*’
    No module named ‘Prelude’ is imported.
    |
478 |         bit_end = (st Prelude.+ 1) Prelude.* 134
    |                                    ^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:480:16: error:
    Not in scope: ‘Prelude.map’
    No module named ‘Prelude’ is imported.
    |
480 |         bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1]
    |                ^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:480:57: error:
    Not in scope: ‘Prelude.-’
    No module named ‘Prelude’ is imported.
    |
480 |         bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1]
    |                                                         ^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:481:24: error:
    Not in scope: ‘Prelude.zip’
    No module named ‘Prelude’ is imported.
    |
481 |         bits_indexed = Prelude.zip bits [0..133]
    |                        ^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:482:31: error:
    Not in scope: ‘Prelude.concatMap’
    Perhaps you meant ‘GHC.Prelude.concatMap’ (imported from GHC.Prelude)
    No module named ‘Prelude’ is imported.
    |
482 |         token_strs_expected = Prelude.concatMap f bits_indexed
    |                               ^^^^^^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:483:12: error:
    Not in scope: data constructor ‘Prelude.False’
    No module named ‘Prelude’ is imported.
    |
483 |         f (Prelude.False, _) = []
    |            ^^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:484:12: error:
    Not in scope: data constructor ‘Prelude.True’
    No module named ‘Prelude’ is imported.
    |
484 |         f (Prelude.True, nr) = [token_strs Prelude.!! nr]
    |            ^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:484:44: error:
    Not in scope: ‘Prelude.!!’
    No module named ‘Prelude’ is imported.
    |
484 |         f (Prelude.True, nr) = [token_strs Prelude.!! nr]
    |                                            ^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:676:23: error:
    Not in scope: type constructor or class ‘Prelude.Int’
    No module named ‘Prelude’ is imported.
    |
676 | happy_n_terms = 78 :: Prelude.Int
    |                       ^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:677:26: error:
    Not in scope: type constructor or class ‘Prelude.Int’
    No module named ‘Prelude’ is imported.
    |
677 | happy_n_nonterms = 54 :: Prelude.Int
    |                          ^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:2667:48: error:
    Not in scope: type constructor or class ‘Prelude.Int’
    No module named ‘Prelude’ is imported.
     |
2667 | happyReduceArr :: () => Happy_Data_Array.Array Prelude.Int (Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ))
     |                                                ^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:2673:44: error:
    Not in scope: type constructor or class ‘Prelude.String’
    Perhaps you meant ‘GHC.Prelude.String’ (imported from GHC.Prelude)
    No module named ‘Prelude’ is imported.
     |
2673 | happyError' :: () => ((Located CmmToken), [Prelude.String]) -> PD a
     |                                            ^^^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3375:99: error:
    Not in scope: type constructor or class ‘Prelude.Int’
    No module named ‘Prelude’ is imported.
     |
3375 |                                      happyFail (happyExpListPerState ((Happy_GHC_Exts.I# (st)) :: Prelude.Int)) i tk st
     |                                                                                                   ^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3378:103: error:
    Not in scope: type constructor or class ‘Prelude.Bool’
    No module named ‘Prelude’ is imported.
     |
3378 |                 n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}
     |                                                                                                       ^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3386:109: error:
    Not in scope: type constructor or class ‘Prelude.Bool’
    No module named ‘Prelude’ is imported.
     |
3386 |          check  = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#))
     |                                                                                                             ^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3387:115: error:
    Not in scope: type constructor or class ‘Prelude.Bool’
    No module named ‘Prelude’ is imported.
     |
3387 |                   then EQ(indexShortOffAddr happyCheck off_i, i)
     |                                                                                                                   ^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3388:24: error:
    Not in scope: data constructor ‘Prelude.False’
    No module named ‘Prelude’ is imported.
     |
3388 |                   else Prelude.False
     |                        ^^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3391:13: error:
    Not in scope: ‘Prelude.otherwise’
    Perhaps you meant ‘GHC.Prelude.otherwise’ (imported from GHC.Prelude)
    No module named ‘Prelude’ is imported.
     |
3391 |           | Prelude.otherwise = indexShortOffAddr happyDefActions st
     |             ^^^^^^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3408:71: error:
    Not in scope: type constructor or class ‘Prelude.Bool’
    No module named ‘Prelude’ is imported.
     |
3408 | happyLt x y = LT(x,y)
     |                                                                       ^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3412:115: error:
    Not in scope: ‘Prelude.mod’
    No module named ‘Prelude’ is imported.
     |
3412 |     Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `Prelude.mod` 16)
     |                                                                                                                   ^^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3556:17: error:
    Not in scope: ‘Prelude.error’
    No module named ‘Prelude’ is imported.
     |
3556 | notHappyAtAll = Prelude.error "Internal Happy error\n"
     |                 ^^^^^^^^^^^^^

/home/rgscott/Software/ghc-9.0/.hadrian_ghci/stage0/compiler/build/GHC/Cmm/Parser.hs:3574:22: error:
    Not in scope: ‘Prelude.seq’
    No module named ‘Prelude’ is imported.
     |
3574 | happyDoSeq   a b = a `Prelude.seq` b
     |                      ^^^^^^^^^^^^^

Downgrading to an earlier version of happy (e.g., happy-1.19.12) is a workaround. As far as I can tell, this issue makes all old versions of GHC unbuildable with happy-1.20.0.

I'm not quite sure what the best way forward is here, but cherry-picking commit fddddbf4 appears to be one possible solution. Thoughts, @int-index?

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