Skip to content

GHC panics during build of etkmett/free

While using stack, I get the following error:

--  While building package free-4.12.4 using:
      /home/user/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.24.0.0_ghc-8.0.1 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.0.0 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/user/dev/haskellito/.stack-work/logs/free-4.12.4.log

    Configuring free-4.12.4...
    Building free-4.12.4...
    Preprocessing library free-4.12.4...
    [ 1 of 16] Compiling Control.Monad.Free.TH ( src/Control/Monad/Free/TH.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Control/Monad/Free/TH.o )
    [ 2 of 16] Compiling Control.Monad.Free.Class ( src/Control/Monad/Free/Class.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Control/Monad/Free/Class.o )
    [ 3 of 16] Compiling Control.Monad.Trans.Iter ( src/Control/Monad/Trans/Iter.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Control/Monad/Trans/Iter.o )
    ghc: panic! (the 'impossible' happened)
      (GHC version 8.0.1 for x86_64-unknown-linux):
    	Ix{Int}.index: Index (16777216) out of range ((0,392))
    
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

This reproduced even with a clean ~/.stack (this includes downloading the GHC binaries again), and the only necessary condition to reproduce for me was having lens as a dependency.

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