compdata-0.6.1.4: Compositional Data Types

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

Data.Comp.MultiParam.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 i -> a j -> FreshM OrderingSource

Instances

POrd Name 
Ord a => POrd (K a) 
(OrdHD f, POrd a) => POrd (Cxt h f Name a) 

class EqHD f => OrdHD f whereSource

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

Methods

compareHD :: POrd a => f Name a i -> f Name a j -> FreshM OrderingSource

Instances

OrdHD f => OrdHD (Cxt h f)

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

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

OrdHD is propagated through sums.