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

Modulerebase-1.21.2Haskell2010

Rebase.Control.Selective.Rigid.Free

  • 1 type
  • 6 values
  • Packagerebase-1.21.2
  • Exports7
  • LanguageHaskell2010
  • LicenceMIT
  • SourceFree.hs
valuefoldSelect :: Monoid m => (forall x. f x -> m) -> Select f a -> m
#

Concatenate all effects of a free selective computation.

valuegetEffects :: Functor f => Select f a -> [f ()]
#

Collect all possible effects in the order they appear in a free selective computation.

valuegetPure :: Select f a -> Maybe a
#

Extract the resulting value if there are no necessary effects.

valuerunSelect :: Selective g => (forall x. f x -> g x) -> Select f a -> g a
#

Given a natural transformation from f to g, this gives a canonical natural transformation from Select f to g.

valuegetNecessaryEffect :: Functor f => Select f a -> Maybe (f ())
#

Extract the necessary effect from a free selective computation. Note: there can be at most one effect that is statically guaranteed to be necessary.