[GHC] #10263: Role annotation should never be ambiguous

#10263: Role annotation should never be ambiguous -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 (Type checker) | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC rejects Architecture: | valid program Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- {{{ [ezyang@hs01 ghc-backpack]$ cat A.hs {-# LANGUAGE RoleAnnotations #-} module A where data Maybe a = AF type role Maybe representational [ezyang@hs01 ghc-backpack]$ ghc -c A.hs A.hs:4:11: Ambiguous occurrence ‘Maybe’ It could refer to either ‘A.Maybe’, defined at A.hs:3:1 or ‘Prelude.Maybe’, imported from ‘Prelude’ at A.hs:2:8 (and originally defined in ‘GHC.Base’) }}} This is silly because roles can only ever be defined with the declaration, so only one reference makes sense. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10263 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10263: Role annotation should never be ambiguous -------------------------------------+------------------------------------- Reporter: ezyang | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | Blocking: Blocked By: | Differential Revisions: Related Tickets: | -------------------------------------+------------------------------------- Changes (by simonpj): * owner: => goldfire Comment: You are quite right. I have not looked into how role annotations are renamed, but presumably they are rather like signatures. For those we use `RnEnv.lookupSigOccRn`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10263#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10263: Role annotation should never be ambiguous
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.11
checker) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: GHC rejects | Test Case:
valid program | Blocking:
Blocked By: | Differential Revisions:
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by Richard Eisenberg

#10263: Role annotation should never be ambiguous -------------------------------------+------------------------------------- Reporter: ezyang | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 7.10.2 Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | roles/should_compile/T10263 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => merge * testcase: => roles/should_compile/T10263 * milestone: => 7.10.2 Comment: Merge if convenient. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10263#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10263: Role annotation should never be ambiguous -------------------------------------+------------------------------------- Reporter: ezyang | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 7.10.2 Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | roles/should_compile/T10263 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by ezyang): Woohoo, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10263#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10263: Role annotation should never be ambiguous -------------------------------------+------------------------------------- Reporter: ezyang | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 7.10.2 Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | roles/should_compile/T10263 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by thoughtpolice): Merged to `ghc-7.10`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10263#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10263: Role annotation should never be ambiguous -------------------------------------+------------------------------------- Reporter: ezyang | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: 7.10.2 Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | roles/should_compile/T10263 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10263#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC