Fix and improve deriving for indexed data types
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 4 Jan 2007 01:31:56 +0000 (01:31 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 4 Jan 2007 01:31:56 +0000 (01:31 +0000)
commit3548802de235eca280982270463db84910ee3748
tree78373054ade8bb2b0781043111585824b8d8a85d
parentec15937afed087f6b134b21012e5ceba71dc6364
Fix and improve deriving for indexed data types
- The test for being able to derive the requested classes needs to be made
  with the representation tycon (not the family tycon).
- Standalone deriving for indexed types requires the instance types in the
  derive clause to match a data/newtype instance exactly (modulo alpha).
compiler/typecheck/TcDeriv.lhs
compiler/typecheck/TcEnv.lhs
compiler/types/FamInstEnv.lhs
compiler/types/Type.lhs