#"     (c) Dennis Gosnell, 2016BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXSafe A monadic version of  .   leftAction ===  leftAction  (fromEitherM (\s -> [length s]) $ Right 5[5]7fromEitherM (\s -> [length s]) $ Left ("foo" :: String)[3]A ed version of .*fromEitherOrM (Right 5) $ \s -> [length s][5],This can be nice to use as an error handler.FfromEitherOrM (Right 5) $ \s -> putStrLn ("error: " ++ s) >> undefined5IfromEitherOrM (Left "foo") $ \s -> putStrLn ("error: " ++ s) >> undefined error: foo...A monadic version of .   nothingAction ===  nothingAction  fromMaybeM [] $ Just 5[5]fromMaybeM [] Nothing[]A ed version of .fromMaybeOrM (Just 5) [][5],This can be nice to use as an error handler.CfromMaybeOrM (Just 5) $ putStrLn "some error occurred" >> undefined5DfromMaybeOrM (Nothing) $ putStrLn "some error occurred" >> undefinedsome error occurred... Similar to  but the " argument is also a monadic value.3fromEitherMM (\s -> [length s]) [Right 5, Right 10][5,10]CfromEitherMM (\s -> [length s]) [Left ("foo" :: String), Right 100][3,100]NOTE: I don't particularly like the name of this function. If you have a suggestion for a better name, please submit a PR or issue.A ed version of . Similar to  but the " argument is also a monadic value.fromMaybeMM [] [Just 6, Just 5][6,5](fromMaybeMM [] [Just 6, Nothing, Just 7][6,7]NOTE: I don't particularly like the name of this function. If you have a suggestion for a better name, please submit a PR or issue.A ed version of .  Similar to .fromEither show $ Left 5"5"fromEither show $ Right "hello""hello" A ed version of  . A ed version of .  Collapse an  a a to an a. Defined as   ..Note: Other libraries export this function as  fromEither , but our  # function is slightly more general.collapseEither (Right 3)3collapseEither (Left "hello")"hello"  Similar to   , but for ..import Control.Monad.Except (ExceptT(ExceptT))*collapseExceptT (ExceptT $ pure (Right 3))3/collapseExceptT (ExceptT $ pure (Left "hello"))"hello"          'from-sum-0.2.0.0-InJ7ptXLd05Eyk6qyBFAvTControl.FromSumbase Data.Maybe fromMaybe fromEitherM fromEitherOrM fromMaybeM fromMaybeOrM fromEitherMMfromEitherOrMM fromMaybeMM fromMaybeOrMM fromEither fromEitherOr fromMaybeOrcollapseEithercollapseExceptT Data.EithereitherGHC.BasepureflipmaybeEitherMaybeidtransformers-0.5.2.0Control.Monad.Trans.ExceptExceptT