1{-# LANGUAGE AllowAmbiguousTypes #-}
2{-# LANGUAGE UndecidableInstances #-}
3{-# OPTIONS_HADDOCK not-home #-}
4-- | Type-safe indexing for 'Effectful.Internal.Monad.Env'.
6-- This module is intended for internal use only, and may change without warning
7-- in subsequent releases.
8module Effectful.Internal.Effect
16type Effect = (Type -> Type) -> Type -> Type
18-- | Adapter for statically dispatched effects.
19newtype IdE (e :: Effect) where
20 IdE :: (forall m r. e m r) -> IdE e
22class (e :: Effect) :> (es :: [Effect]) where
23 -- | Get the position of @e@ in @es@.
25 -- /Note:/ GHC is kind enough to cache these values as they're top level CAFs,
26 -- so the lookup is amortized @O(1)@ without any language level tricks.
28 reifyIndex = -- Don't show "minimal complete definition" in haddock.
31instance {-# OVERLAPPING #-} e :> (e : es) where
34instance e :> es => e :> (x : es) where
35 reifyIndex = 1 + reifyIndex @e @es
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list