GeneralizedNewtypeDeriving is still not Safe
|Reported by:||goldfire||Owned by:|
|Type of failure:||None/Unknown||Test Case:||should_fail/TcCoercibleFailSafe|
|Related Tickets:||Differential Rev(s):|
In GHC 7.8, GeneralizedNewtypeDeriving (GND) is type-safe, due to the advent of roles. Although GND allows looking through unimported constructors, the notion of abstraction has changed -- for a type to be fully abstract in 7.8, it must not export its constructors, and the roles of all its parameters must be nominal. Thus, it would seem that GND should be Safe; that is, in the Safe Haskell subset. See also #5498.
Currently, GND is not considered Safe.
Along similar lines, the
coerce mechanism could be considered Safe, but there is no way to import these into a Safe module (they are in