Segmentation fault with UnliftedDatatypes in GHCi
I got a segfault while loading a file with unlifted data types into GHCi. I created this file:
-- Unlifted.hs
{-# LANGUAGE UnliftedDatatypes #-}
import GHC.Exts
type Strict :: * -> TYPE ('BoxedRep 'Unlifted)
data Strict a = Force a
x :: Int
x = 10
where
test :: Strict Int
test = Force undefined
Then I loaded it in GHCi and tried evaluating x
:
$ ghci Unlifted.hs
... (some warnings about the * kind and the unused test variable)
> x
Segmentation fault
Environment
- GHC version used: 9.2.0.20210331
Optional:
- Operating System: Debian 10
- System Architecture: Linux x86_64