[GHC] #5948: Parentheses needed when declaring a type synonym with ':

GHC cvs-ghc at haskell.org
Fri Mar 16 22:20:12 CET 2012


#5948: Parentheses needed when declaring a type synonym with ':
---------------------------------------+------------------------------------
 Reporter:  goldfire                   |          Owner:                   
     Type:  bug                        |         Status:  new              
 Priority:  normal                     |      Component:  Compiler (Parser)
  Version:  7.5                        |       Keywords:  DataKinds        
       Os:  Unknown/Multiple           |   Architecture:  Unknown/Multiple 
  Failure:  GHC rejects valid program  |       Testcase:                   
Blockedby:                             |       Blocking:                   
  Related:                             |  
---------------------------------------+------------------------------------
 Consider the following code:

 {{{
 {-# LANGUAGE DataKinds, TypeOperators #-}

 type Foo = (Int ': '[])

 type Bar = Int ': '[]
 }}}

 The declaration for {{{Foo}}} compiles, while the declaration for
 {{{Bar}}} fails with a parse error on {{{:}}}.

 This is clearly easy to work around, but I thought it was enough of an
 infelicity to be reported.

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



More information about the Glasgow-haskell-bugs mailing list