compdata-param-0.9: Parametric 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.Multi.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 i -> a j -> FreshM Bool Source

Instances

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

class EqHD f where Source

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

Instances

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

EqHD is propagated through sums.

EqHD f => EqHD (Cxt h f)

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