Skip to content

DfltProb1(optasm): panic CoreToStg.myCollectArgs

The program looks like this:

module DfltProb1 where

import Control.Monad.ST
import Prelude hiding (traverse)

traverse :: a -> ST s [a]
traverse = undefined

-- WORKS with signature test :: Num a => [a]
test = runST (traverse 1)

main = print test

This is the failure:

$ ghc-7.11.20151225 -O DfltProb1.hs
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.11.20151224 for x86_64-unknown-linux):
	CoreToStg.myCollectArgs
  (case traverse of _ [Occ=Dead] { }) realWorld#
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information