[GHC] #8708: Kind annotation in tuple not parsed

GHC ghc-devs at haskell.org
Mon Mar 23 16:34:25 UTC 2015


#8708: Kind annotation in tuple not parsed
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.7
  (Parser)                           |                Keywords:
      Resolution:                    |            Architecture:
Operating System:  Unknown/Multiple  |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by thomie):

 What about the following:

 * unboxed tuples: `(# Int, Int :: * #)`
 * lists: `[ Int :: * ]`
 * parallel arrays: `[: Int :: * :]`
 * default declarations: `default ( Int :: * )`

 Currently all of those don't allow types with kind annotation but without
 parenthesis. They only allow `ctype`s:

 {{{
 -- A ctype is a for-all type
 ctype   :: { RdrNameHsType }
         : 'forall' tv_bndrs '.' ctype   { mkHsForAllTy (Just $2) [] $4 }
         | context '=>' type             { mkHsForAllTy Nothing   $1 $3 }
         -- A type of form (context => type) is an *implicit* HsForAllTy
         | type                          { $1 }
 }}}

 Implementation wise it would be nice to keep doing the same for all:
 either allow kind annotation without parenthesis, or keep the status quo
 (since 2002).

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


More information about the ghc-tickets mailing list