patch applied (ghc): Fix Trac #2456: eliminate duplicate bindings when deriving

Simon Peyton Jones simonpj at microsoft.com
Wed Aug 20 08:12:45 EDT 2008


Wed Aug 20 05:07:51 PDT 2008  simonpj at microsoft.com
  * Fix Trac #2456: eliminate duplicate bindings when deriving
  
  Condsider deriving two overlapping Data declarations for the same type
  	deriving instance Data (T A)
  	deriving instance Data (T B)
  
  We were getting duplicate bindings for the data-con and tycon auxiliary
  bindings for T.  This patch fixes the problem by doing these two decls
  the same way as we do con2tag etc.  
  
  (Why might you want such instances; see Trac #2456.)
  

    M ./compiler/typecheck/TcGenDeriv.lhs -42 +43

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20080820120751-1287e-821243b74dbfb68e071067011af54256e670d22e.gz



More information about the Cvs-ghc mailing list