urk! lookup local fingerprint with ghci -O
Test cgrun054
, as well as many others, causes a panic when using ghci with optimisations.
cgrun054.hs
(minimized)
module Main where
data X = A1
foo :: X -> ()
foo A1 = ()
bar :: X -> ()
bar y = foo y
main = seq (map bar [A1]) (return ())
$ stage1/bin/ghc --interactive -O -fno-unoptimized-core-for-interpreter cgrun054
GHCi, version 9.9.20230703: https://www.haskell.org/ghc/ :? for help
[1 of 2] Compiling Main ( cgrun054.hs, interpreted )
<glooming warnings>
<no location info>: error:
panic! (the 'impossible' happened)
GHC version 9.9.20230703:
urk! lookup local fingerprint
X
[]
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Panic.hs:191:37 in ghc-9.9-inplace:GHC.Utils.Panic
pprPanic, called at compiler/GHC/Iface/Recomp.hs:1050:37 in ghc-9.9-inplace:GHC.Iface.Recomp
CallStack (from HasCallStack):
panic, called at compiler/GHC/Utils/Error.hs:503:29 in ghc-9.9-inplace:GHC.Utils.Error
Adding -fno-break-points
is a workaround.