compdata-0.5.1: Compositional Data Types

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

Data.Comp.MultiParam.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 i -> a j -> FreshM BoolSource

Instances

PEq Name 
Eq a => PEq (K a) 
(EqHD f, PEq a) => PEq (Cxt h f Name a) 

class EqHD f whereSource

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

Methods

eqHD :: PEq a => f Name a i -> f Name a j -> FreshM BoolSource

Instances

EqHD f => EqHD (Cxt h f)

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

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

EqHD is propagated through sums.