@@ -28,7 +28,7 @@ This module provides a standard way to deal with possible errors encounted
28during parsing.
28during parsing.
31−module Text.Pandoc.Error (PandocError(..), handleError,hush, mapLeft) where
31+module Text.Pandoc.Error (PandocError(..), handleError) where
33import Text.Parsec.Error
33import Text.Parsec.Error
34import Text.Parsec.Pos hiding (Line)
34import Text.Parsec.Pos hiding (Line)
@@ -46,13 +46,6 @@ data PandocError = -- | Generic parse failure
46instance Error PandocError where
46instance Error PandocError where
47 strMsg = ParseFailure
47 strMsg = ParseFailure
49−mapLeft :: (a -> b) -> Either a c -> Either b c
50−mapLeft f (Left x) = Left (f x)
51−mapLeft _ (Right x) = Right x
53−hush :: Either a b -> Maybe b
54−hush (Left _) = Nothing
55−hush (Right x) = Just x
57-- | An unsafe method to handle `PandocError`s.
50-- | An unsafe method to handle `PandocError`s.
58handleError :: Either PandocError a -> a
51handleError :: Either PandocError a -> a