[GHC] #8485: Type roles in GHCi

#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

#8485: Type roles in GHCi -------------------------------------+------------------------------------ Reporter: monoidal | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonpj): * owner: => goldfire Comment: You are right... the latter should be rejected, just as if you'd given a type signature with no accompanying value declaration. I'm sure Richard will look at this. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8485#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8485: Type roles in GHCi
-------------------------------------+------------------------------------
Reporter: monoidal | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
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 Richard Eisenberg

#8485: Type roles in GHCi
-------------------------------------+------------------------------------
Reporter: monoidal | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
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 Richard Eisenberg

#8485: Type roles in GHCi ---------------------------------------+----------------------------------- Reporter: monoidal | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: ghci/scripts/T8485 | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by goldfire): * status: new => closed * testcase: => ghci/scripts/T8485 * resolution: => fixed Comment: Fixed -- thanks for pointing this out! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8485#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC