diff options
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Docx/Parse.hs | 5 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/EPUB.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/OPML.hs | 2 |
5 files changed, 5 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index e8fe92e27..9bd51f5a8 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -14,7 +14,7 @@ import Data.List (intersperse) import Data.Maybe (fromMaybe) import Text.TeXMath (readMathML, writeTeX) import Text.Pandoc.Error (PandocError) -import Text.Pandoc.Compat.Except +import Control.Monad.Except import Data.Default import Data.Foldable (asum) diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index b51572783..fa534f801 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -98,7 +98,7 @@ import Data.Traversable (traverse) #endif import Text.Pandoc.Error -import Text.Pandoc.Compat.Except +import Control.Monad.Except readDocxWithWarnings :: ReaderOptions -> B.ByteString diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs index 3efdb70a8..b9021ec08 100644 --- a/src/Text/Pandoc/Readers/Docx/Parse.hs +++ b/src/Text/Pandoc/Readers/Docx/Parse.hs @@ -64,7 +64,7 @@ import Control.Monad.Reader import Control.Monad.State import Control.Applicative ((<|>)) import qualified Data.Map as M -import Text.Pandoc.Compat.Except +import Control.Monad.Except import Text.Pandoc.Shared (safeRead) import Text.TeXMath.Readers.OMML (readOMML) import Text.Pandoc.Readers.Docx.Fonts (getUnicode, Font(..)) @@ -91,9 +91,6 @@ data ReaderState = ReaderState { stateWarnings :: [String] } data DocxError = DocxError | WrongElem deriving Show -instance Error DocxError where - noMsg = WrongElem - type D = ExceptT DocxError (ReaderT ReaderEnv (State ReaderState)) runD :: D a -> ReaderEnv -> ReaderState -> (Either DocxError a, ReaderState) diff --git a/src/Text/Pandoc/Readers/EPUB.hs b/src/Text/Pandoc/Readers/EPUB.hs index 36c52aecb..e547b84cd 100644 --- a/src/Text/Pandoc/Readers/EPUB.hs +++ b/src/Text/Pandoc/Readers/EPUB.hs @@ -16,7 +16,7 @@ import Text.Pandoc.Options ( ReaderOptions(..), readerTrace) import Text.Pandoc.Shared (escapeURI, collapseFilePath, addMetaField) import Network.URI (unEscapeString) import Text.Pandoc.MediaBag (MediaBag, insertMedia) -import Text.Pandoc.Compat.Except (MonadError, throwError, runExcept, Except) +import Control.Monad.Except (MonadError, throwError, runExcept, Except) import Text.Pandoc.MIME (MimeType) import qualified Text.Pandoc.Builder as B import Codec.Archive.Zip ( Archive (..), toArchiveOrFail, fromEntry diff --git a/src/Text/Pandoc/Readers/OPML.hs b/src/Text/Pandoc/Readers/OPML.hs index b2e5f2e67..7ee9ef398 100644 --- a/src/Text/Pandoc/Readers/OPML.hs +++ b/src/Text/Pandoc/Readers/OPML.hs @@ -11,7 +11,7 @@ import Text.Pandoc.Compat.TagSoupEntity (lookupEntity) import Data.Generics import Control.Monad.State import Data.Default -import Text.Pandoc.Compat.Except +import Control.Monad.Except import Text.Pandoc.Error type OPML = ExceptT PandocError (State OPMLState) |