HaTeX-1.0.1: Library for generate LaTeX code.

Text.LaTeX.Monad

Contents

Synopsis

LaTeX Monad

type LaTeXM a = WriterT Result IO aSource

LaTeXM is the monad that represents LaTeX code. Bind operator plays as concatenator.

Instances of LaTeXM a:

Basic functions over LaTeX Monad

lx :: Result -> LaTeXSource

Write a result.

lxany :: Show a => a -> LaTeXSource

Write anything of Show class.

lxw :: Result -> LaTeXM aSource

Like lx, but returns an undefined value.

lxanyw :: Show b => b -> LaTeXM aSource

Like lxany, but returns an undefined value.

nlx :: LaTeXM a -> IO ResultSource

Run a LaTeXM computation, returning his result.

iolx :: IO a -> LaTeXM aSource

Performs an IO computation, returning his value in the LaTeXM monad.

reslx :: (Result -> Result) -> LaTeXM a -> LaTeXM aSource

Transform a Result modifier in a LaTeXM modifier.

Generalizing