compdata-param-0.9.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

Contents

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.

Minimal complete definition

pcompare

Methods

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

Instances
Ord a => POrd a Source # 
Instance details

Defined in Data.Comp.Param.Ordering

Methods

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

POrd a => POrd [a] Source # 
Instance details

Defined in Data.Comp.Param.Ordering

Methods

pcompare :: [a] -> [a] -> FreshM Ordering Source #

(OrdD f, POrd a) => POrd (Cxt h f Name a) Source # 
Instance details

Defined in Data.Comp.Param.Ordering

Methods

pcompare :: Cxt h f Name a -> Cxt h f Name a -> FreshM Ordering Source #

class EqD f => OrdD f where Source #

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

Minimal complete definition

compareD

Methods

compareD :: POrd a => f Name a -> f Name a -> FreshM Ordering Source #

Instances
(OrdD f, OrdD g) => OrdD (f :+: g) Source #

OrdD is propagated through sums.

Instance details

Defined in Data.Comp.Param.Ordering

Methods

compareD :: POrd a => (f :+: g) Name a -> (f :+: g) Name a -> FreshM Ordering Source #

OrdD f => OrdD (Cxt h f) Source #

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

Instance details

Defined in Data.Comp.Param.Ordering

Methods

compareD :: POrd a => Cxt h f Name a -> Cxt h f Name a -> FreshM Ordering Source #

Orphan instances

(Difunctor f, OrdD f) => Ord (Term f) Source #

Ordering of terms.

Instance details

Methods

compare :: Term f -> Term f -> Ordering #

(<) :: Term f -> Term f -> Bool #

(<=) :: Term f -> Term f -> Bool #

(>) :: Term f -> Term f -> Bool #

(>=) :: Term f -> Term f -> Bool #

max :: Term f -> Term f -> Term f #

min :: Term f -> Term f -> Term f #