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

Moduleoptics-core-0.4.1.1Haskell2010

Optics.Operators.Unsafe

  • 1 value
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...