multirec-0.7.7: Generic programming for families of recursive datatypes

Copyright(c) 2008--2010 Universiteit Utrecht
LicenseBSD3
Maintainergenerics@haskell.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Generics.MultiRec.Eq

Contents

Description

Generic equality.

Synopsis

Generic equality

class HEq phi f where Source

Methods

heq :: (forall ix. phi ix -> r ix -> r ix -> Bool) -> phi ix -> f r ix -> f r ix -> Bool Source

Instances

HEq phi U Source 
Eq a => HEq phi (K a) Source

For constant types, we make use of the standard equality function.

El phi xi => HEq phi (I xi) Source 
(Constructor c, HEq phi f) => HEq phi (C c f) Source 
HEq phi f => HEq phi ((:>:) f ix) Source 
(Eq1 f, HEq phi g) => HEq phi ((:.:) f g) Source 
(HEq phi f, HEq phi g) => HEq phi ((:*:) f g) Source 
(HEq phi f, HEq phi g) => HEq phi ((:+:) f g) Source 

class Eq1 f where Source

Methods

eq1 :: (a -> a -> Bool) -> f a -> f a -> Bool Source

Instances

eq :: (Fam phi, HEq phi (PF phi)) => phi ix -> ix -> ix -> Bool Source