Safe Haskell | Safe-Inferred |
---|
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).
- class StateExtension a => Fresh a where
- project :: a -> Integer
- inject :: Integer -> 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
class StateExtension a => Fresh a whereSource
State extension class definition, including combinators and convenient synonyms.
inject :: Integer -> 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