| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Effectful.Internal.Effect
Contents
Description
Type-safe indexing for Env.
This module is intended for internal use only, and may change without warning in subsequent releases.
Documentation
class (e :: Effect) :> (es :: [Effect]) where Source #
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:
StateInteger:>es =>Effes ()
Minimal complete definition
Nothing
Methods
reifyIndex :: Int Source #
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.
Instances
| (TypeError (('Text "There is no handler for '" :<>: 'ShowType e) :<>: 'Text "' in the context") :: Constraint) => e :> ('[] :: [Effect]) Source # | |
Defined in Effectful.Internal.Effect Methods reifyIndex :: Int Source # | |
| e :> es => e :> (x ': es) Source # | |
Defined in Effectful.Internal.Effect Methods reifyIndex :: Int Source # | |
| e :> (e ': es) Source # | |
Defined in Effectful.Internal.Effect Methods reifyIndex :: Int Source # | |
type family xs :>> es :: Constraint where ... Source #
class Subset (xs :: [Effect]) (es :: [Effect]) where Source #
Provide evidence that xs is a subset of es.
Minimal complete definition
Nothing
Methods
reifyIndices :: [Int] Source #
Instances
| Subset ('[] :: [Effect]) es Source # | |
Defined in Effectful.Internal.Effect Methods reifyIndices :: [Int] Source # | |
| (e :> es, Subset xs es) => Subset (e ': xs) es Source # | |
Defined in Effectful.Internal.Effect Methods reifyIndices :: [Int] Source # | |