HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Moduleoptics-core-0.4.2Haskell2010

Optics.Internal.Utils

This module is intended for internal use only, and may change without warning in subsequent releases.

  • 3 types
  • 7 values
  • Packageoptics-core-0.4.2
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUtils.hs
valuewrapIdentity' :: a -> Identity' a
#

Mark a value for evaluation to whnf.

This allows us to, when applying a setter to a structure, evaluate only the parts that we modify. If an optic focuses on multiple targets, Applicative instance of Identity' makes sure that we force evaluation of all of them, but we leave anything else alone.

datadata OrT (f :: k -> Type) (a :: k)
#

Helper for failing family to visit the first fold only once.

Constructors

Instances2Functor, Applicative
valuewrapOrT :: f a -> OrT f a
#

Wrap the applicative action in OrT so that we know later that it was executed.

value(#.) :: Coercible b c => (b -> c) -> (a -> b) -> a -> c
#

Composition operator where the first argument must be an identity function up to representational equivalence (e.g. a newtype wrapper or unwrapper), and will be ignored at runtime.

value(.#) :: Coercible a b => (b -> c) -> (a -> b) -> a -> c
#

Composition operator where the second argument must be an identity function up to representational equivalence (e.g. a newtype wrapper or unwrapper), and will be ignored at runtime.

valueuncurry' :: (a -> b -> c) -> (a, b) -> c
#

uncurry with no lazy pattern matching for more efficient code.