compdata-0.5.3: Compositional Data Types

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

Data.Comp.Param.Ordering

Description

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

Synopsis

Documentation

class PEq a => POrd a whereSource

Ordering of parametric values.

Methods

pcompare :: a -> a -> FreshM OrderingSource

Instances

Ord a => POrd a 
POrd a => POrd [a] 
(OrdD f, POrd a) => POrd (Cxt h f Name a) 

class EqD f => OrdD f whereSource

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

Methods

compareD :: POrd a => f Name a -> f Name a -> FreshM OrderingSource

Instances

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

OrdD is propagated through sums.

OrdD f => OrdD (Cxt h f)

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