Copyright | (c) 2023-2025 Sayo contributors |
---|---|
License | MPL-2.0 (see the file LICENSE) |
Maintainer | ymdfield@outlook.jp |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Data.Effect.Output
Description
This module provides the Output
effect, comes
from Polysemy.Output
in the polysemy
package.
Realizes output of values to the external world.
Synopsis
- data Output o :: Effect where
- data OutputLabel
- output'_ :: forall (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, In (Output o) es) => o -> f ()
- output'' :: forall tag (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, (:>) (Tagged tag (Output o)) es) => o -> f ()
- output' :: forall key (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, Has key (Output o) es) => o -> f ()
- output :: forall (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, (:>) (Output o) es) => o -> f ()
- runOutputEff :: forall o es ff a c. Free c ff => (o -> Eff ff es ()) -> Eff ff (Output o ': es) a -> Eff ff es a
- ignoreOutput :: forall o es ff a c. (Applicative (Eff ff es), Free c ff) => Eff ff (Output o ': es) a -> Eff ff es a
Documentation
data Output o :: Effect where Source #
A general effect representing output of values to the external world.
Instances
FirstOrder (Output o) Source # | |
Defined in Data.Effect.Output | |
HFunctor (Output o) Source # | |
Defined in Data.Effect.Output | |
type LabelOf (Output o) Source # | |
Defined in Data.Effect.Output | |
type OrderOf (Output o) Source # | |
Defined in Data.Effect.Output |
data OutputLabel Source #
output'_ :: forall (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, In (Output o) es) => o -> f () Source #
Output a value to the external world.
output'' :: forall tag (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, (:>) (Tagged tag (Output o)) es) => o -> f () Source #
Output a value to the external world.
output' :: forall key (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, Has key (Output o) es) => o -> f () Source #
Output a value to the external world.
output :: forall (o :: Type) f es ff c. (Free c ff, f ~ Eff ff es, (:>) (Output o) es) => o -> f () Source #
Output a value to the external world.
runOutputEff :: forall o es ff a c. Free c ff => (o -> Eff ff es ()) -> Eff ff (Output o ': es) a -> Eff ff es a Source #
Interprets the Output
effect using the given output handler.
ignoreOutput :: forall o es ff a c. (Applicative (Eff ff es), Free c ff) => Eff ff (Output o ': es) a -> Eff ff es a Source #
Interprets the Output
effect by ignoring the outputs.