MK
Size: a a a
MK
MK
DB
DB
MK
DB
MK
λ> data Kek a = Kek deriving Show; type role Kek phantom
λ> coerce (Kek @Int) :: Kek Bool
Kek
MK
λ> data Kek a = Kek deriving Show; type role Kek nominal
λ> coerce (Kek @Int) :: Kek Bool
<interactive>:13:1: error:
• Couldn't match type ‘Int’ with ‘Bool’
arising from a use of ‘coerce’
DB
λ> data Kek a = Kek deriving Show; type role Kek phantom
λ> coerce (Kek @Int) :: Kek Bool
Kek
DB
λ> data Kek a = Kek deriving Show; type role Kek phantom
λ> coerce (Kek @Int) :: Kek Bool
Kek
MK
MK
DB
к
DB