Agda
Safe HaskellNone
LanguageHaskell2010

Agda.Utils.StrictWriter

Description

This is a very strict Writer monad, as a wrapper on Agda.Utils.StrictState.

Documentation

newtype Writer w a Source #

Constructors

Writer 

Fields

Instances

Instances details
Applicative (Writer w) Source # 
Instance details

Defined in Agda.Utils.StrictWriter

Methods

pure :: a -> Writer w a #

(<*>) :: Writer w (a -> b) -> Writer w a -> Writer w b #

liftA2 :: (a -> b -> c) -> Writer w a -> Writer w b -> Writer w c #

(*>) :: Writer w a -> Writer w b -> Writer w b #

(<*) :: Writer w a -> Writer w b -> Writer w a #

Functor (Writer w) Source # 
Instance details

Defined in Agda.Utils.StrictWriter

Methods

fmap :: (a -> b) -> Writer w a -> Writer w b #

(<$) :: a -> Writer w b -> Writer w a #

Monad (Writer w) Source # 
Instance details

Defined in Agda.Utils.StrictWriter

Methods

(>>=) :: Writer w a -> (a -> Writer w b) -> Writer w b #

(>>) :: Writer w a -> Writer w b -> Writer w b #

return :: a -> Writer w a #

tell :: Monoid w => w -> Writer w () Source #

listen :: Monoid w => Writer w a -> Writer w (a, w) Source #

writer :: Monoid w => (a, w) -> Writer w a Source #

censor :: Monoid w => (w -> w) -> Writer w a -> Writer w a Source #

runWriter :: Monoid w => Writer w a -> (a, w) Source #

execWriter :: Monoid w => Writer w a -> w Source #