[GHC] #8246: Role annotations does not allow the use of parenthesis

GHC ghc-devs at haskell.org
Fri Sep 6 19:57:48 CEST 2013


#8246: Role annotations does not allow the use of parenthesis
-------------------------------------+-------------------------------------
       Reporter:  DaniilFrumin       |             Owner:
           Type:  bug                |            Status:  new
       Priority:  normal             |         Milestone:
      Component:  Compiler (Parser)  |           Version:  7.7
       Keywords:  roles              |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple   |   Type of failure:  None/Unknown
     Difficulty:  Unknown            |         Test Case:
     Blocked By:                     |          Blocking:
Related Tickets:                     |
-------------------------------------+-------------------------------------
 There is an inconsistency in roles/kinds annotations wrt parenthesis.

 For example, the following code compiles just fine

 {{{
 data A (a::*) = A
 }}}

 unlike this code

 {{{
 data A (a at R) = A
 }}}

 which results in a compilation error:

 Unexpected type `a at R' where type variable expected
     In the declaration of `A (a at R)'

 As Austin Seipp has pointed out, it boils down to simply: 'data A (a) = A'

 This also prompts for further
 [http://ghc.haskell.org/trac/ghc/wiki/Roles#Roleandkindannotations
 discussion] about role annotations in presence of kind annotations [1].
 For example, should '((a :: *)@R)' be a correct annotation?

 Related (?) ticket: #8185

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




More information about the ghc-tickets mailing list