compdata-param-0.8.0.2: Parametric 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.Param.Ordering

Description

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

Synopsis

Documentation

class PEq a => POrd a where Source

Ordering of parametric values.

Methods

pcompare :: a -> a -> FreshM Ordering Source

Instances

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

class EqD f => OrdD f where Source

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

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.