[GHC] #8828: allow fully applied type families in instance heads
GHC
ghc-devs at haskell.org
Thu Feb 27 00:56:43 UTC 2014
#8828: allow fully applied type families in instance heads
------------------------------------+-------------------------------------
Reporter: aavogt | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.2
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
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
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8828>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list