Safe Haskell | Safe |
---|---|
Language | GHC2021 |
Control.XMonad.XAccum
Documentation
Indexed Accumulator monad.
This is an indexed version of mtl's
MonadAccum.
Accumulator can be seen as a Writer with the extra capability of reading the
result of previus tell
s. Or as State where modifications are limited to appends.
We fix the internal indexed monoid here to ->
for simplicity, as this is
the only one we need.
Instances
XApplicative XAccum # | |
Defined in Control.XMonad.XAccum Methods xpure :: forall a (p :: k). a -> XAccum p p a # (<*>:) :: forall (p :: k) (q :: k) a b (r :: k). XAccum p q (a -> b) -> XAccum q r a -> XAccum p r b # xliftA2 :: forall a b c (p :: k) (q :: k) (r :: k). (a -> b -> c) -> XAccum p q a -> XAccum q r b -> XAccum p r c # (*>:) :: forall (p :: k) (q :: k) a (r :: k) b. XAccum p q a -> XAccum q r b -> XAccum p r b # (<*:) :: forall (p :: k) (q :: k) a (r :: k) b. XAccum p q a -> XAccum q r b -> XAccum p r a # | |
XMonad XAccum # | |
Functor (XAccum i j) # | |