tct-2.0.1: A Complexity Analyser for Term Rewrite Systems

Portabilityunportable
Stabilityunstable
MaintainerMartin Avanzini <martin.avanzini@uibk.ac.at>
Safe HaskellSafe-Infered

Tct.Utils.Enum

Contents

Description

This module provides the datatype Enumeration together with operations.

Synopsis

Documentation

class (Typeable a, Eq a) => Numbering a where

A numbering can be used as index in an Enumeration.

Methods

ppNumbering :: a -> Doc

data SomeNumbering

Existential quantification of Numbering.

Constructors

forall a . Numbering a => SN a 

type Enumeration e = [(SomeNumbering, e)]

An enum is an associated list with existentially quantified numberings.

Operations

enumeration :: Numbering a => [(a, e)] -> Enumeration e

toList :: Enumeration e -> [e]

find :: Numbering n => n -> Enumeration a -> Maybe a

zipEnum :: [(SomeNumbering, t)] -> [(SomeNumbering, a1)] -> [Maybe (SomeNumbering, (t, a1))]

mapEnum :: (e -> f) -> Enumeration e -> Enumeration f

evalEnum :: SolverM m => Bool -> Enumeration (m a) -> m (Maybe (Enumeration a))