HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulepolysemy-extra-0.2.1.0Haskell2010

Polysemy.Extra

Extra convenience functions for polysemy.

  • 20 values

Input

4 declarations

Output

4 declarations

Raise

1 declaration
valueraise4Under
  1. :: Sem (e1 ': e2 ': e3 ': e4 ': r) a
  2. -> Sem (e1 ': e2 ': e3 ': e4 ': e5 ': r) a
#

Like raise, but introduces an effect four levels underneath the head of the list.

Reinterpreters

3 declarations
valuereinterpretUnder
  1. :: (forall (m :: [Effect]) x. Sem (e2 ': m) x -> Sem (e3 ': m) x)

    A natural transformation from the handled effect to the new effects.

  2. -> Sem (e1 ': e2 ': r) a
  3. -> Sem (e1 ': e3 ': r) a
#

Reinterpret the second effect in the stack into a single effect.

valuereinterpretUnder2
  1. :: (forall (m :: [Effect]) x. Sem (e3 ': m) x -> Sem (e4 ': m) x)

    A natural transformation from the handled effect to the new effects.

  2. -> Sem (e1 ': e2 ': e3 ': r) a
  3. -> Sem (e1 ': e2 ': e4 ': r) a
#

Reinterpret the third effect in the stack into a single effect.

valuereinterpret2Under
  1. :: (forall (m :: [Effect]) x. Sem (e2 ': m) x -> Sem (e3 ': e4 ': m) x)

    A natural transformation from the handled effect to the new effects.

  2. -> Sem (e1 ': e2 ': r) a
  3. -> Sem (e1 ': e3 ': e4 ': r) a
#

Reinterpret the second effect in the stack in terms of two effects.

Rotation

5 declarations
valuerotateEffects2 :: Sem (e1 ': e2 ': r) a -> Sem (e2 ': e1 ': r) a
#

Swap the positions of the first two effects in the stack.

valuerotateEffects3L
  1. :: Sem (e1 ': e2 ': e3 ': r) a
  2. -> Sem (e2 ': e3 ': e1 ': r) a
#

Rotate the first three effects in the stack to the left.

valuerotateEffects3R
  1. :: Sem (e1 ': e2 ': e3 ': r) a
  2. -> Sem (e3 ': e1 ': e2 ': r) a
#

Rotate the first three effects in the stack to the right.

valuerotateEffects4L
  1. :: Sem (e1 ': e2 ': e3 ': e4 ': r) a
  2. -> Sem (e2 ': e3 ': e4 ': e1 ': r) a
#

Rotate the first four effects in the stack to the left.

valuerotateEffects4R
  1. :: Sem (e1 ': e2 ': e3 ': e4 ': r) a
  2. -> Sem (e4 ': e1 ': e2 ': e3 ': r) a
#

Rotate the first four effects in the stack to the right.

Reverse

3 declarations
valuereverseEffects3
  1. :: Sem (e1 ': e2 ': e3 ': r) a
  2. -> Sem (e3 ': e2 ': e1 ': r) a
#

Reverse the position of the first three effects in the stack.

valuereverseEffects4
  1. :: Sem (e1 ': e2 ': e3 ': e4 ': r) a
  2. -> Sem (e4 ': e3 ': e2 ': e1 ': r) a
#

Reverse the position of the first four effects in the stack.