[GHC] #8485: Type roles in GHCi

GHC ghc-devs at haskell.org
Tue Oct 29 07:36:22 UTC 2013


#8485: Type roles in GHCi
------------------------------------+-------------------------------------
       Reporter:  monoidal          |             Owner:
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.7
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 This works:

 {{{
 λ> data A a; type role A nominal
 λ> :i A
 type role A nominal
 data A a
 }}}

 This doesn't:

 {{{
 λ> data A a
 λ> type role A nominal
 λ> :i A
 type role A phantom
 data A a
 }}}

 Accepting role annotations after the definition probably leads to problems
 when intermediate definitions relied on the earlier role; so I think the
 second situation should give an error. In fact, in the second snippet GHC
 does not even require -XRoleAnnotations.

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


More information about the ghc-tickets mailing list