Ticket #3714 (closed feature request: fixed)
Distinguish type parameters from indices
| Reported by: | simonpj | Owned by: | chak |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.4.1 |
| Component: | Compiler | Version: | 6.10.4 |
| Keywords: | Cc: | martijn@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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
Change History
Note: See
TracTickets for help on using
tickets.
