Skip to content

ghc 7.6.3: type parser accepts => as -> (sometimes)

The following examples are all parsed and type checked even though they don't seem to be conforming to the Haskell standard syntax:

a :: Int => Int
a = (1+)

b :: a -> a => a
b = const

c :: Num a => [a => a => a]
c = [(+)]

Slight variations fail (as the should) - for example

b' :: a -> b => a
b' = const

/Patrik


Linux cse-814009 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Edited by Herbert Valerio Riedel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information