[GHC] #13598: role annotation for newtype (partially?) ignored?

GHC ghc-devs at haskell.org
Thu Apr 20 17:17:37 UTC 2017


#13598: role annotation for newtype (partially?) ignored?
-------------------------------------+-------------------------------------
        Reporter:  edsko             |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1-rc2
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by facundo.dominguez):

 From what the paper says, I gather that the reason to enable coercions
 between `C a` and `C b` when the constructors are in scope is to offer
 zero-cost coercions which wouldn't be possible to achieve if only the
 `foo1` route is allowed.

 I guess the user guide could discuss the newtype nuances for Coercible.
 Otherwise it looks like GHC is allowing coercions when it shouldn't.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13598#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list