HORIZON HASKELLDocslts/ghc-10.0.x4d334ea2026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 4d334ea · 2026-10-12

Moduleoptics-core-0.4.2Haskell2010

Optics.Operators.Unsafe

  • 1 value
  • Packageoptics-core-0.4.2
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUnsafe.hs
value(^?!) :: (HasCallStack, Is k An_AffineFold) => s -> Optic' k is s a -> a
#

Perform an *UNSAFE* head of an affine fold assuming that it is there.

Example1 expression
Left 4 ^?! _Left4
Example1 expression
"world" ^?! ix 3'l'
Example1 expression
[] ^?! _head*** Exception: (^?!): empty affine fold...