Copyright | (c) 2023-2025 Sayo contributors |
---|---|
License | MPL-2.0 (see the file LICENSE) |
Maintainer | ymdfield@outlook.jp |
Safe Haskell | None |
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 (a :: Type -> Type) b where
- data OutputLabel
- output :: forall o f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, Output o :> es) => o -> f ()
- output' :: forall {k} (key :: k) o f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, Has key (Output o) es) => o -> f ()
- output'' :: forall {k} (tag :: k) o f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, Tagged tag (Output o) :> es) => o -> f ()
- output'_ :: forall o f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, In (Output o) es) => o -> f ()
- runOutputEff :: forall o (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) a (c :: (Type -> Type) -> Constraint). Free c ff => (o -> Eff ff es ()) -> Eff ff (Output o ': es) a -> Eff ff es a
- ignoreOutput :: forall o (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) a (c :: (Type -> Type) -> Constraint). (Applicative (Eff ff es), Free c ff) => Eff ff (Output o ': es) a -> Eff ff es a
Documentation
data Output o (a :: Type -> Type) b where Source #
A general effect representing output of values to the external world.
Constructors
Output :: forall o (a :: Type -> Type). o -> Output o a () | Output a value to the external world. |
Instances
FirstOrder (Output o) Source # | |
Defined in Data.Effect.Output | |
PolyHFunctor (Output o) Source # | |
Defined in Data.Effect.Output | |
HFunctor (Output o) Source # | |
Defined in Data.Effect.Output | |
type FormOf (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 f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, Output o :> es) => o -> f () Source #
Output a value to the external world.
output' :: forall {k} (key :: k) o f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, Has key (Output o) es) => o -> f () Source #
Output a value to the external world.
output'' :: forall {k} (tag :: k) o f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, Tagged tag (Output o) :> es) => o -> f () Source #
Output a value to the external world.
output'_ :: forall o f (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Free c ff, f ~ Eff ff es, In (Output o) es) => o -> f () Source #
Output a value to the external world.