pencil-1.0.0: Static site generator

Safe HaskellNone
LanguageHaskell2010

Pencil.App

Description

Pencil's run and error types.

Synopsis

Documentation

type PencilApp = ReaderT Config (ExceptT PencilException IO) Source #

The primary monad transformer stack for a Pencil application.

This unrolls to:

PencilApp a = Config -> IO (Except PencilException a)

The ExceptT monad allows us to catch "checked" exceptions; errors that we know how to handle, in PencilException. Note that Unknown "unchecked" exceptions can still go through IO.

run :: PencilApp a -> Config -> IO () Source #

Run the Pencil app.

Note that this can throw a fatal exception.