hindent-5.2.1: Extensible Haskell pretty printer

Safe HaskellNone
LanguageHaskell98

HIndent.Types

Description

All types.

Synopsis

Documentation

newtype Printer a Source #

A pretty printing monad.

Constructors

Printer 

Instances

Monad Printer Source # 

Methods

(>>=) :: Printer a -> (a -> Printer b) -> Printer b #

(>>) :: Printer a -> Printer b -> Printer b #

return :: a -> Printer a #

fail :: String -> Printer a #

Functor Printer Source # 

Methods

fmap :: (a -> b) -> Printer a -> Printer b #

(<$) :: a -> Printer b -> Printer a #

Applicative Printer Source # 

Methods

pure :: a -> Printer a #

(<*>) :: Printer (a -> b) -> Printer a -> Printer b #

(*>) :: Printer a -> Printer b -> Printer b #

(<*) :: Printer a -> Printer b -> Printer a #

Alternative Printer Source # 

Methods

empty :: Printer a #

(<|>) :: Printer a -> Printer a -> Printer a #

some :: Printer a -> Printer [a] #

many :: Printer a -> Printer [a] #

MonadPlus Printer Source # 

Methods

mzero :: Printer a #

mplus :: Printer a -> Printer a -> Printer a #

MonadState PrintState Printer Source # 

data PrintState Source #

The state of the pretty printer.

Constructors

PrintState 

Fields

data Config Source #

Configurations shared among the different styles. Styles may pay attention to or completely disregard this configuration.

Constructors

Config 

Fields

defaultConfig :: Config Source #

Default style configuration.

data NodeInfo Source #

Information for each node in the AST.

Constructors

NodeInfo 

Fields