Richard
In GHC.Ptr we see
type role Ptr representational
data Ptr a = Ptr Addr# deriving (Eq, Ord)
with no comments. Why is Ptr representational?
In the same module we have castPtr, which unpacks and repacks a Ptr. If Ptr was phantom, we could use coerce. And that in turn would actually make a lot of code more efficient – there are lots of calls to
castPtr.
Simon