Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
class Arrow arr => ArrowOptic k arr where Source #
Instances
Arrow arr => ArrowOptic A_Lens arr Source # | |
ArrowChoice arr => ArrowOptic A_Prism arr Source # | |
ArrowChoice arr => ArrowOptic An_AffineTraversal arr Source # | |
Defined in Optics.Arrow | |
Arrow arr => ArrowOptic An_Iso arr Source # | |
assignA :: (Is k A_Setter, Arrow arr) => Optic k is s t a b -> arr s b -> arr s t Source #
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 = ...