GeneralizedNewtypeDeriving is still not Safe
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 (closed).
Currently, GND is not considered Safe.
Along similar lines, the Coercible
and coerce
mechanism could be considered Safe, but there is no way to import these into a Safe module (they are in GHC.Exts
).
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.1-rc1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |