compdata-0.8: 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.Multi.Ordering

Description

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

Synopsis

Documentation

class KEq f => KOrd f where Source

Methods

kcompare :: f i -> f j -> Ordering Source

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

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

Methods

compareHF :: KOrd a => f a i -> f a j -> Ordering Source

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.