wryte-0.2.0.0: Pretty output for source generators

Safe HaskellNone
LanguageHaskell2010

Text.Wryte.Core

Documentation

data Wryte t a Source #

Instances

Monoid t => MonadWriter t (Wryte t) Source # 

Methods

writer :: (a, t) -> Wryte t a #

tell :: t -> Wryte t () #

listen :: Wryte t a -> Wryte t (a, t) #

pass :: Wryte t (a, t -> t) -> Wryte t a #

Monoid t => Monad (Wryte t) Source # 

Methods

(>>=) :: Wryte t a -> (a -> Wryte t b) -> Wryte t b #

(>>) :: Wryte t a -> Wryte t b -> Wryte t b #

return :: a -> Wryte t a #

fail :: String -> Wryte t a #

Functor (Wryte t) Source # 

Methods

fmap :: (a -> b) -> Wryte t a -> Wryte t b #

(<$) :: a -> Wryte t b -> Wryte t a #

Monoid t => Applicative (Wryte t) Source # 

Methods

pure :: a -> Wryte t a #

(<*>) :: Wryte t (a -> b) -> Wryte t a -> Wryte t b #

(*>) :: Wryte t a -> Wryte t b -> Wryte t b #

(<*) :: Wryte t a -> Wryte t b -> Wryte t a #

Monoid t => MonadReader (WryteOptions t) (Wryte t) Source # 

Methods

ask :: Wryte t (WryteOptions t) #

local :: (WryteOptions t -> WryteOptions t) -> Wryte t a -> Wryte t a #

reader :: (WryteOptions t -> a) -> Wryte t a #

(StrLen t, Monoid t, IsString t) => IsString (Wryte t ()) Source # 

Methods

fromString :: String -> Wryte t () #

runWryte :: Monoid t => IsString t => WryteOptions t -> Wryte t a -> (a, t) Source #

runWryte_ :: Monoid t => IsString t => WryteOptions t -> Wryte t () -> t Source #

data WryteOptions t Source #

Constructors

WryteOptions 

Instances

Monoid t => MonadReader (WryteOptions t) (Wryte t) Source # 

Methods

ask :: Wryte t (WryteOptions t) #

local :: (WryteOptions t -> WryteOptions t) -> Wryte t a -> Wryte t a #

reader :: (WryteOptions t -> a) -> Wryte t a #

class StrLen a where Source #

Minimal complete definition

strlen

Methods

strlen :: a -> Int Source #

Instances

StrLen Text Source # 

Methods

strlen :: Text -> Int Source #

StrLen Text Source # 

Methods

strlen :: Text -> Int Source #

StrLen [a] Source # 

Methods

strlen :: [a] -> Int Source #

wryte :: StrLen t => Monoid t => t -> Wryte t () Source #

wryteLn :: Monoid t => IsString t => StrLen t => t -> Wryte t () Source #

eol :: Monoid t => IsString t => Wryte t () Source #

aligned :: StrLen t => Monoid t => Wryte t a -> Wryte t a Source #

indented :: Monoid t => Wryte t a -> Wryte t a Source #