Module

Control.Monad.Transformerless.Writer

Package
purescript-transformerless
Repository
thimoteus/purescript-transformerless

#Writer Source

newtype Writer w a

Constructors

Instances

#runWriter Source

runWriter :: forall a w. Writer w a -> Tuple a w

#execWriter Source

execWriter :: forall a w. Writer w a -> w

#mapWriter Source

mapWriter :: forall b a w2 w1. (Tuple a w1 -> Tuple b w2) -> Writer w1 a -> Writer w2 b

#mapW Source

mapW :: forall b a w. (a -> b) -> Writer w a -> Writer w b

#(|->) Source

Operator alias for Control.Monad.Transformerless.Writer.mapW (left-associative / precedence 4)

#applyW Source

applyW :: forall b a w. Semigroup w => Writer w (a -> b) -> Writer w a -> Writer w b

#(~) Source

Operator alias for Control.Monad.Transformerless.Writer.applyW (left-associative / precedence 4)

#pureW Source

pureW :: forall a w. Monoid w => a -> Writer w a

#bindW Source

bindW :: forall b a w. Semigroup w => Writer w a -> (a -> Writer w b) -> Writer w b

#(>>-) Source

Operator alias for Control.Monad.Transformerless.Writer.bindW (left-associative / precedence 1)

#pass Source

pass :: forall a w. Writer w (Tuple a (w -> w)) -> Writer w a

#listen Source

listen :: forall a w. Writer w a -> Writer w (Tuple a w)

#tell Source

tell :: forall w. w -> Writer w Unit

#listens Source

listens :: forall b a w. Monoid w => (w -> b) -> Writer w a -> Writer w (Tuple a b)

#censor Source

censor :: forall a w. Monoid w => (w -> w) -> Writer w a -> Writer w a