compdata-0.7.0.2: Compositional Data Types

Copyright(c) 2011 Patrick Bahr, Tom Hvitved
LicenseBSD3
MaintainerTom Hvitved <hvitved@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellNone
LanguageHaskell98

Data.Comp.Param.Equality

Description

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

Synopsis

Documentation

class PEq a where Source

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

Methods

peq :: a -> a -> FreshM Bool Source

Instances

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

class EqD f where Source

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 Bool Source

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.