-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell functionality for quickly assembling simple compilers. -- -- Haskell monad and combinators for quickly assembling simple -- compilation algorithms. @package compilation @version 0.0.0.1 module Control.Compilation.Compile type FreshIndex = Integer type Indentation = String type ModuleName = String type NestingDepth = Integer data State a State :: FreshIndex -> Indentation -> (Maybe ModuleName) -> NestingDepth -> a -> State a empState :: a -> State a data Compile a b Compile :: (State a -> (State a, b)) -> Compile a b extract :: Compile a () -> a -> a nothing :: Compile a () fresh :: Compile a String freshWithPrefix :: String -> Compile a String setModule :: String -> Compile a () getModule :: Compile a (Maybe String) nest :: Compile a () unnest :: Compile a () depth :: Compile a Integer indent :: Compile String () unindent :: Compile String () space :: Compile String () spaces :: Int -> Compile String () newline :: Compile String () newlines :: Int -> Compile String () string :: String -> Compile String () raw :: String -> Compile String () instance Monad (Compile a)