
2 Jan
2023
2 Jan
'23
7:01 p.m.
Is there supposed to be this surprising difference between ex1 and ex2? {-# LANGUAGE UnliftedDatatypes #-} {-# OPTIONS_GHC -Wall #-} module Main where import GHC.Exts (UnliftedType) type T :: UnliftedType data T = T ex1 :: () ex1 = let _ = undefined :: T in () ex2 :: () ex2 = let _a = undefined :: T in () ghci> ex1 () ghci> ex2 *** Exception: Prelude.undefined CallStack (from HasCallStack): undefined, called at test17.hs:53:16 in fake-package-0-inplace:Main