Closed type families break substitution
This code causes a Core Lint error:
{-# LANGUAGE TypeFamilies #-}
type family F a b where
F (Maybe a) [a] = Int
F b c = Bool
data Proxy a = P
type family G
foo :: Proxy d -> F d d -> Bool
foo _ = not
bar :: Bool -> Bool
bar = foo (P :: Proxy G)
The solution needs to freshen variables before doing apartness checking. I will fix in due course.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |