Distinguish type parameters from indices
Martijn van Steenbergen pointed out this program:
{-# LANGUAGE TypeFamilies #-}
module M where
-- Accepted
type family T1 f e :: *
class C1 f where
op1 :: T1 f e -> Either e a
-- Rejected
class C2 f where
type T2 f e :: *
op2 :: T2 f e -> Either e a
At the moment (HEAD) the C1/T1 version is accepted but the C2/T2 declarations are rejected:
TF.hs:12:3: Not in scope: type variable `e'
I think this is just a bug.
Simon
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | martijn@van.steenbergen.nl |
Operating system | |
Architecture |