Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class Arrow arr => ArrowOptic k arr where #
Instances
ArrowChoice arr => ArrowOptic An_AffineTraversal arr # | |
Defined in Optics.Arrow overA :: Optic An_AffineTraversal [] s t a b -> arr a b -> arr s t # | |
ArrowChoice arr => ArrowOptic A_Prism arr # | |
Defined in Optics.Arrow | |
Arrow arr => ArrowOptic A_Lens arr # | |
Defined in Optics.Arrow | |
Arrow arr => ArrowOptic An_Iso arr # | |
Defined in Optics.Arrow |
assignA :: (Is k A_Setter, Arrow arr) => Optic k '[] s t a b -> arr s b -> arr s t #
Run an arrow command and use the output to set all the targets of an optic to the result.
runKleisli action ((), (), ()) where action = assignA _1 (Kleisli (const getVal1)) >>> assignA _2 (Kleisli (const getVal2)) >>> assignA _3 (Kleisli (const getVal3)) getVal1 :: Either String Int getVal1 = ... getVal2 :: Either String Bool getVal2 = ... getVal3 :: Either String Char getVal3 = ...