compdata-0.6.1.2: Compositional Data Types

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

Data.Comp.Param.FreshM

Description

This module defines a monad for generating fresh, abstract names, useful e.g. for defining equality on terms.

Synopsis

Documentation

data FreshM a Source

Monad for generating fresh (abstract) names.

Instances

data Name Source

Abstract notion of a name (the constructor is hidden).

Instances

Eq Name 
Ord Name 
Show Name 
(EqD f, PEq a) => PEq (Cxt h f Name a) 
(OrdD f, POrd a) => POrd (Cxt h f Name a) 

withName :: (Name -> FreshM a) -> FreshM aSource

Run the given computation with the next available name.

evalFreshM :: FreshM a -> aSource

Evaluate a computation that uses fresh names.