Type pattern synonyms
Hi, it would be nice if the following example were acceptable:
{-# LANGUAGE FlexibleInstances, TypeFamilies, TypeSynonymInstances #-}
data X a = X a
type family TX a
type instance TX a = X a
instance Show (TX Int)
But ghc complains that it cannot substitute the instance of TX:
ts.hs:6:10:
Illegal type synonym family application in instance: TX Int
In the instance declaration for ‛Show (TX Int)’
A more practical (but not self-contained) example involving extensible records looks http://lpaste.net/100436
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.2 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |