compdata-0.11: Compositional Data Types

Copyright(c) Patrick Bahr 2011
LicenseBSD3
MaintainerPatrick Bahr <paba@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellNone
LanguageHaskell98

Data.Comp.Multi.Equality

Contents

Description

This module defines equality for (higher-order) signatures, which lifts to equality for (higher-order) terms and contexts. All definitions are generalised versions of those in Data.Comp.Equality.

Synopsis

Documentation

class EqHF f where Source #

Signature equality. An instance EqHF f gives rise to an instance KEq (HTerm f).

Minimal complete definition

eqHF

Methods

eqHF :: KEq g => f g i -> f g j -> Bool Source #

Instances

EqHF f => EqHF (Cxt h f) Source # 

Methods

eqHF :: KEq g => Cxt h f g i -> Cxt h f g j -> Bool Source #

(EqHF f, EqHF g) => EqHF ((:+:) * f g) Source #

EqF is propagated through sums.

Methods

eqHF :: KEq g => (* :+: f) g g i -> (* :+: f) g g j -> Bool Source #

class KEq f where Source #

Minimal complete definition

keq

Methods

keq :: f i -> f j -> Bool Source #

Instances

Eq a => KEq (K a) Source # 

Methods

keq :: K a i -> K a j -> Bool Source #

(EqHF f, KEq a) => KEq (Cxt h f a) Source # 

Methods

keq :: Cxt h f a i -> Cxt h f a j -> Bool Source #

heqMod :: (EqHF f, HFunctor f, HFoldable f) => f a i -> f b i -> Maybe [(E a, E b)] Source #

This function implements equality of values of type f a modulo the equality of a itself. If two functorial values are equal in this sense, eqMod returns a Just value containing a list of pairs consisting of corresponding components of the two functorial values.

Orphan instances

KEq a => Eq (E a) Source # 

Methods

(==) :: E a -> E a -> Bool #

(/=) :: E a -> E a -> Bool #

(EqHF f, KEq a) => Eq (Cxt h f a i) Source #

From an EqF functor an Eq instance of the corresponding term type can be derived.

Methods

(==) :: Cxt h f a i -> Cxt h f a i -> Bool #

(/=) :: Cxt h f a i -> Cxt h f a i -> Bool #