compdata-0.7: Compositional Data Types

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

Data.Comp.Multi.Ordering

Description

This module defines ordering of signatures, which lifts to ordering of terms and contexts.

Synopsis

Documentation

class KEq f => KOrd f whereSource

Methods

kcompare :: f i -> f j -> OrderingSource

Instances

Ord a => KOrd (K a) 
KOrd (Numbered a) 
(HFunctor f, OrdHF f, KOrd a) => KOrd (Cxt h f a) 

class EqHF f => OrdHF f whereSource

Signature ordering. An instance OrdHF f gives rise to an instance Ord (Term f).

Methods

compareHF :: KOrd a => f a i -> f a j -> OrderingSource

Instances

(HFunctor f, OrdHF f) => OrdHF (Cxt h f)

From an OrdHF difunctor an Ord instance of the corresponding term type can be derived.

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

OrdHF is propagated through sums.