HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleeffectful-core-2.3.0.1Haskell2010

Effectful.Internal.Effect

Type-safe indexing for Effectful.Internal.Monad.Env.

This module is intended for internal use only, and may change without warning in subsequent releases.

  • 2 types
  • 4 classes
classclass (:>) (e :: Effect) (es :: [Effect]) where
#

A constraint that requires that a particular effect e is a member of the type-level list es. This is used to parameterize an Eff computation over an arbitrary list of effects, so long as e is somewhere in the list.

For example, a computation that only needs access to a mutable value of type Integer would have the following type:

State Integer :> es => Eff es ()

Methods

  • reifyIndex :: Int

    Get the position of e in es.

    Note: GHC is kind enough to cache these values as they're top level CAFs, so the lookup is amortized O(1) without any language level tricks.

Instances3:>
  • TypeError (('Text "There is no handler for '" ':<>: 'ShowType e) ':<>: 'Text "' in the context") => e :> '[]Defined in effectful-core-2.3.0.1 · Effectful.Internal.Effect
  • e :> (e ': es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.Effect
  • e :> es => e :> (x ': es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.Effect
familytype family (:>>) (xs :: [Effect]) (es :: [Effect]) :: Constraint where
#

Deprecated. Usage of (:>>) slows down GHC too much, so it will be removed in 3.0.0.0. See https://github.com/haskell-effectful/effectful/issues/52#issuecomment-1269155485 for more information.

Convenience operator for expressing that a function uses multiple effects in a more concise way than enumerating them all with (:>).

[E1, E2, ..., En] :>> es ≡ (E1 :> es, E2 :> es, ..., En :> es)

Equations

  • (:>>) '[] es = ()
  • (:>>) (x ': xs) es = (x :> es, xs :>> es)
classclass KnownPrefix es => Subset (xs :: [Effect]) (es :: [Effect]) where
#

Provide evidence that xs is a subset of es.

Instances3Subset

Re-exports

1 declaration
typetype Type = TYPE LiftedRep
#

The kind of types with lifted values. For example Int :: Type.