| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Syntactic.TH
Documentation
Description of class methods
Arguments
| :: Cxt | Instance context |
| -> Name | Type constructor name |
| -> Type | Class head (e.g. |
| -> [Method] | Methods |
| -> DecsQ |
General method for class deriving
General method for class deriving
Derive Equality instance for a type
equal Con1 Con1 = True equal (Con2 a1 ... x1) (Con2 a2 ... x2) = and [a1==a2, ... x1==x2] equal _ _ = False
hash Con1 = hashInt 0 hash (Con2 a ... x) = foldr1 combine [hashInt 1, hash a, ... hash x]