HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

  • Packagelens-5.3.6
  • Exports20
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceReified.hs
Example2 expressions
import Control.Lensimport Control.Applicative
newtypenewtype ReifiedGetter s a

Reify a Getter so it can be stored safely in a container.

This can also be useful when combining getters in novel ways, as ReifiedGetter is isomorphic to (->) and provides similar instances.

Example1 expression
("hello","world","!!!")^.runGetter ((,) <$> Getter _2 <*> Getter (_1.to length))("world",5)

Constructors

Instances27Arrow, ArrowApply, ArrowChoice, ArrowLoop, Choice, Closed, …
newtypenewtype ReifiedIndexedGetter i s a

Reify an IndexedGetter so it can be stored safely in a container.

Instances7Strong, Profunctor, Representable, Sieve, Functor, Apply, …
newtypenewtype ReifiedFold s a

Reify a Fold so it can be stored safely in a container.

This can also be useful for creatively combining folds as ReifiedFold s is isomorphic to ReaderT s [] and provides similar instances.

Example1 expression
("hello","world")^..runFold ((,) <$> Fold _2 <*> Fold both)[("world","hello"),("world","world")]

Constructors

Instances22Arrow, ArrowApply, ArrowChoice, Choice, Strong, Profunctor, …
newtypenewtype ReifiedIndexedFold i s a
#
Instances10Strong, Profunctor, Representable, Sieve, Functor, Alt, …