id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
4083,Generalized newtype deriving fails for newtypes that are type family instances,RANDY Ruler of Zexernet,,"With FlexibleContexts, FlexibleInstances, GeneralizedNewtypeDeriving, StandaloneDeriving, & TypeFamilies the following code produces an ""impossible"" error (genDerivBinds: bad derived class):
{{{
data family F a
newtype instance F [a] = Maybe a
class C a where data D a
deriving instance C (Maybe a) => C (F [a])
}}}

Whereas I expected something like this (which works):
{{{
instance C (Maybe a) => C (F [a]) where newtype D (F [a]) = SomeCon (D (Maybe a))
}}}",bug,closed,normal,,Compiler,6.12.1,invalid,,,Unknown/Multiple,Unknown/Multiple,None/Unknown,,,,,
