compdata-0.12: 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 # 
Instance details

Defined in Data.Comp.Multi.Equality

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.

Instance details

Defined in Data.Comp.Multi.Equality

Methods

eqHF :: KEq g0 => (f :+: g) g0 i -> (f :+: g) g0 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 # 
Instance details

Defined in Data.Comp.Multi.Equality

Methods

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

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

Defined in Data.Comp.Multi.Equality

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 # 
Instance details

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.

Instance details

Methods

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

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