MicroHs-0.17.4.0: tests/Error112.hs
{-# LANGUAGE RoleAnnotations #-}
module Error112() where
import Data.Coerce
type role N nominal
data N a = N a
newtype Age = Age Int
-- A nominal argument cannot be coerced
n :: N Age -> N Int
n = coerce
{-# LANGUAGE RoleAnnotations #-}
module Error112() where
import Data.Coerce
type role N nominal
data N a = N a
newtype Age = Age Int
-- A nominal argument cannot be coerced
n :: N Age -> N Int
n = coerce