-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Composable error messages. -- -- This philosophy behind this package is that it is often better to find -- out all of the errors that have occured in a computation and report -- them simultaneously, rather than aborting as soon as the first error -- is encountered. Towards this end, this module supplies a type of -- combinable error messages so that all of the errors from -- subcomputations can be gathered and presented together. -- -- New in version 1.1: Removed Monoid instance for Doc (it should now be -- supplied by ansi-wl-pprint), added ErrorMessageOr type alias. @package error-message @version 1.1 module Data.ErrorMessage newtype ErrorMessage ErrorMessage :: Map String Doc -> ErrorMessage unwrapErrorMessage :: ErrorMessage -> Map String Doc type ErrorMessageOr = Either ErrorMessage errorMessage :: String -> Doc -> ErrorMessage errorMessageText :: String -> String -> ErrorMessage errorMessageTextFromMultilineString :: String -> String -> ErrorMessage leftErrorMessage :: String -> Doc -> Either ErrorMessage a leftErrorMessageText :: String -> String -> Either ErrorMessage a leftErrorMessageTextFromMultilineString :: String -> String -> Either ErrorMessage a formatErrorMessage :: ErrorMessage -> Doc formatMessageWithHeading :: String -> Doc -> Doc gatherResultsOrErrors :: [Either e a] -> Either [e] [a] gatherResultsOrError :: (Monoid e) => [Either e a] -> Either e [a] instance Error Doc instance Monoid ErrorMessage instance Error ErrorMessage instance (Monoid e, Error e, Monad m) => Applicative (ErrorT e m) instance (Monoid e) => Applicative (Either e)