compdata-0.6.1.3: Compositional Data Types

Portabilitynon-portable (GHC Extensions)
Stabilityexperimental
MaintainerTom Hvitved <hvitved@diku.dk>
Safe HaskellNone

Data.Comp.Param.Equality

Description

This module defines equality for signatures, which lifts to equality for terms.

Synopsis

Documentation

class PEq a whereSource

Equality on parametric values. The equality test is performed inside the FreshM monad for generating fresh identifiers.

Methods

peq :: a -> a -> FreshM BoolSource

Instances

Eq a => PEq a 
PEq a => PEq [a] 
(EqD f, PEq a) => PEq (Cxt h f Name a) 

class EqD f whereSource

Signature equality. An instance EqD f gives rise to an instance Eq (Term f). The equality test is performed inside the FreshM monad for generating fresh identifiers.

Methods

eqD :: PEq a => f Name a -> f Name a -> FreshM BoolSource

Instances

(EqD f, EqD g) => EqD (:+: f g)

EqD is propagated through sums.

EqD f => EqD (Cxt h f)

From an EqD difunctor an Eq instance of the corresponding term type can be derived.