monadic-bang-0.2.2.2: GHC plugin to desugar ! into do-notation
Safe HaskellNone
LanguageGHC2021

MonadicBang.Internal.Effect.Writer.Discard

Description

A Writer carrier that discards any values it is told

Documentation

newtype DiscardC (w :: k) (m :: k1 -> Type) (a :: k1) 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 :: forall w (sig :: (Type -> Type) -> Type -> Type) m a. (Monoid w, Algebra sig m) => DiscardC w m a -> m a Source #