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