compdata-0.7.0.2: 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.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 a Source

Run the given computation with the next available name.

evalFreshM :: FreshM a -> a Source

Evaluate a computation that uses fresh names.