The kind of effects.
Moduleeffectful-core-2.7.1.2GHC2021
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
- 5 classes
- Packageeffectful-core-2.7.1.2
- Exports9
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceEffect.hs
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 :: IntGet the position of
eines.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 (('TextDefined in effectful-core-2.7.1.2 · Effectful.Internal.Effect"There is no handler for '"
':<>: 'ShowType e) ':<>: 'Text"' in the context"
) => e :> '[]e :> (e ': es)Defined in effectful-core-2.7.1.2 · Effectful.Internal.Effecte :> es => e :> (x ': es)Defined in effectful-core-2.7.1.2 · Effectful.Internal.Effect
Deprecated. Usage of (:>>) slows down GHC too much. See https://github.com/haskell-effectful/effectful/issues/52#issuecomment-1269155485 for more information.
Provide evidence that subEs is a subset of es.
Methods
subsetFullyKnown :: BoolreifyIndices :: [Int]
Instances3Subset
(KnownPrefix es, IsUnknownSuffixOf subEs es) => Subset subEs esDefined in effectful-core-2.7.1.2 · Effectful.Internal.EffectKnownPrefix es => Subset '[] esDefined in effectful-core-2.7.1.2 · Effectful.Internal.Effect(e :> es, Subset subEs es) => Subset (e ': subEs) esDefined in effectful-core-2.7.1.2 · Effectful.Internal.Effect
Provide evidence that subEs is a known subset of es.
Instances2KnownSubset
KnownSubset '[] esDefined in effectful-core-2.7.1.2 · Effectful.Internal.Effect(e :> es, KnownSubset subEs es) => KnownSubset (e ': subEs) esDefined in effectful-core-2.7.1.2 · Effectful.Internal.Effect
Calculate length of a statically known prefix of es.
Methods
prefixLength :: Int
Instances2KnownPrefix
KnownPrefix esDefined in effectful-core-2.7.1.2 · Effectful.Internal.EffectKnownPrefix es => KnownPrefix (e ': es)Defined in effectful-core-2.7.1.2 · Effectful.Internal.Effect
Require that subEs is the unknown suffix of es.
Instances2IsUnknownSuffixOf
subEs ~ es => IsUnknownSuffixOf subEs esDefined in effectful-core-2.7.1.2 · Effectful.Internal.EffectIsUnknownSuffixOf subEs es => IsUnknownSuffixOf subEs (e ': es)Defined in effectful-core-2.7.1.2 · Effectful.Internal.Effect
Re-exports
1 declarationThe kind of types with lifted values. For example Int :: Type.