[Template-haskell] Language.Haskell.THSyntax data types deriving Eq

Alastair Reid alastair@reid-consulting-uk.ltd.uk
Wed, 13 Aug 2003 00:14:32 +0100


On Saturday 09 August 2003 3:58 pm, Andre Pang wrote:
> Is there a reason why any/all of the data types in
> Language.Haskell.THSyntax (such as Dec, Stmt, and Type) don't derive
> Eq?  I'm thinking that it would be useful for test suites, in
> particular.

I recently found myself wanting that.

The tricky one is Eq for types that contain forall. The derived instances 
would be wrong if we want to allow alpha conversion. Hand-writing a correct 
instance is pretty tedious.

--
Alastair