monadic-bang-0.2.2.1: GHC plugin to desugar ! into do-notation
Safe HaskellSafe-Inferred
LanguageGHC2021

MonadicBang.Internal.Effect.Writer.Discard

Description

A Writer carrier that discards any values it is told

Documentation

newtype DiscardC w m a Source #

Constructors

DiscardC 

Fields

Instances

Instances details
(Monoid w, Algebra sig m) => Algebra (Writer w :+: sig) (DiscardC w m) Source # 
Instance details

Defined in MonadicBang.Internal.Effect.Writer.Discard

Methods

alg :: forall ctx (n :: Type -> Type) a. Functor ctx => Handler ctx n (DiscardC w m) -> (Writer w :+: sig) n a -> ctx () -> DiscardC w m (ctx a) #

Applicative m => Applicative (DiscardC w m) Source # 
Instance details

Defined in MonadicBang.Internal.Effect.Writer.Discard

Methods

pure :: a -> DiscardC w m a #

(<*>) :: DiscardC w m (a -> b) -> DiscardC w m a -> DiscardC w m b #

liftA2 :: (a -> b -> c) -> DiscardC w m a -> DiscardC w m b -> DiscardC w m c #

(*>) :: DiscardC w m a -> DiscardC w m b -> DiscardC w m b #

(<*) :: DiscardC w m a -> DiscardC w m b -> DiscardC w m a #

Functor m => Functor (DiscardC w m) Source # 
Instance details

Defined in MonadicBang.Internal.Effect.Writer.Discard

Methods

fmap :: (a -> b) -> DiscardC w m a -> DiscardC w m b #

(<$) :: a -> DiscardC w m b -> DiscardC w m a #

Monad m => Monad (DiscardC w m) Source # 
Instance details

Defined in MonadicBang.Internal.Effect.Writer.Discard

Methods

(>>=) :: DiscardC w m a -> (a -> DiscardC w m b) -> DiscardC w m b #

(>>) :: DiscardC w m a -> DiscardC w m b -> DiscardC w m b #

return :: a -> DiscardC w m a #

evalWriter :: (Monoid w, Algebra sig m) => DiscardC w m a -> m a Source #