Malformed instance declaration produces panic
The following code produces a panic with 7.5:
module Test where
class F a b where
f :: a b Int
instance F -> b where
f _ = 1
whereas this code works as expected:
{-# LANGUAGE MultiParamTypeClasses , FlexibleInstances#-}
module Test where
class F a b where
f :: a b Int
instance F (->) b where
f _ = 1
GHC 7.2.2 correctly identifies this as a malformed instance header.
Trac metadata
Trac field | Value |
---|---|
Version | 7.5 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Parser) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |