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

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

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...