[GHC] #10252: Abstract newtype in hs-boot
GHC
ghc-devs at haskell.org
Tue Apr 7 16:07:53 UTC 2015
#10252: Abstract newtype in hs-boot
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.11
checker) | Keywords: backpack
Resolution: worksforme | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by goldfire):
This scares me. `data` and `newtype` are different! After a quick ponder,
I don't see damage that can be caused by abusing this.
But, if we ever had representational type families (where `type instance
RepF Int = Bool` would be used to reduce `RepF Age` to `Bool`), this would
be a disaster. I can't seem to find a ticket requesting representational
matching for type families (or classes, or data families), but the idea
has come up. (See some wonderings in this direction in #9112, for
example.)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10252#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list