
#9163: Ptr should have a phantom role -------------------------------------+------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonpj): Well, remember that even if Ptr has a phantom role, the two types (Ptr Int) and (Ptr Double) would be different types. It's just that you could *coerce* between them. Which is perhaps not unreasonable. Indeed that is precisely what castPtr does. It’s not silent or implicit. I still don't see why it would be bad to make `Ptr` phantom. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9163#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler