GHC panic when printing Unique
|Reported by:||sebf||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
The following program causes panic:
import UniqSupply main = mkSplitUniqSupply 'x' >>= print . uniqFromSupply
The error message is:
ghcbug: ghcbug: panic! (the 'impossible' happened) (GHC version 6.10.1 for i386-apple-darwin): Static flags have not been initialised! Please call GHC.newSession or GHC.parseStaticFlags early enough.
I have encountered this on an Apple MacBook with GHC 6.10.1 and could reproduce it on a Linux PC with the same GHC version.
The module UniqSupply comes from the ghc package which is hidden by default. So before compiling it (or running it in GHCi) type
ghc-pkg expose ghc
in a shell.