| Safe Haskell | Safe-Inferred | 
|---|
Control.Compilation.Fresh
Description
Compilation Monad and combinators for quickly assembling simple compilers.
Control/Compilation/Fresh.hs
State extension class and combinators for implementations of a state that support generation of fresh (i.e., unique) values (integers and strings).
- type FreshIndex = Integer
 - type StateExtensionFresh = FreshIndex
 - class StateExtension a => HasFresh a  where
- project :: a -> StateExtensionFresh
 - inject :: StateExtensionFresh -> a -> a
 - freshInteger :: Compilation a Integer
 - freshString :: Compilation a String
 - freshStringWithPrefix :: String -> Compilation a String
 - freshWithPrefix :: String -> Compilation a String
 - fresh :: Compilation a String
 - fresh_ :: String -> Compilation a String
 - freshes :: Integer -> Compilation a [String]
 - freshes_ :: String -> Integer -> Compilation a [String]
 
 
Documentation
type FreshIndex = IntegerSource
Type synonyms and class memberships.
class StateExtension a => HasFresh a whereSource
State extension class definition, including combinators and convenient synonyms.
Methods
project :: a -> StateExtensionFreshSource
inject :: StateExtensionFresh -> a -> aSource
freshInteger :: Compilation a IntegerSource
freshString :: Compilation a StringSource
freshStringWithPrefix :: String -> Compilation a StringSource
freshWithPrefix :: String -> Compilation a StringSource
fresh :: Compilation a StringSource
fresh_ :: String -> Compilation a StringSource
freshes :: Integer -> Compilation a [String]Source
freshes_ :: String -> Integer -> Compilation a [String]Source