Type operators can be defined without the TypeOperators extension flag
The following code is accepted without any extension flags given:
data a :*: b = Foo a b
type a :+: b = Either a b
However, to use the defined types we need the TypeOperators flag, without it the following code will not be accepted:
f :: Int :*: Int -> Int
f (Foo x y) = x+y
It seems clear to me that GHC should not accept the former either without the TypeOperators extension enabled.
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |