aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pandoc.cabal1
-rw-r--r--src/Text/Pandoc/Error.hs5
-rw-r--r--src/Text/Pandoc/ImageSize.hs3
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs2
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs2
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse.hs5
-rw-r--r--src/Text/Pandoc/Readers/EPUB.hs2
-rw-r--r--src/Text/Pandoc/Readers/OPML.hs2
8 files changed, 6 insertions, 16 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index a6fc81a50..6d891e625 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -415,7 +415,6 @@ Library
Text.Pandoc.Slides,
Text.Pandoc.Highlighting,
Text.Pandoc.Compat.Time,
- Text.Pandoc.Compat.Except,
Text.Pandoc.Compat.TagSoupEntity,
Text.Pandoc.Compat.Directory,
Paths_pandoc
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index 292396aee..5e26771fe 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -33,7 +33,6 @@ module Text.Pandoc.Error (PandocError(..), handleError) where
import Text.Parsec.Error
import Text.Parsec.Pos hiding (Line)
-import Text.Pandoc.Compat.Except
import GHC.Generics (Generic)
import Data.Generics (Typeable)
import Control.Exception (Exception)
@@ -48,10 +47,6 @@ data PandocError = -- | Generic parse failure
instance Exception PandocError
-instance Error PandocError where
- strMsg = ParseFailure
-
-
-- | An unsafe method to handle `PandocError`s.
handleError :: Either PandocError a -> a
handleError (Right r) = r
diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs
index 90dfbb5fb..e46c91eda 100644
--- a/src/Text/Pandoc/ImageSize.hs
+++ b/src/Text/Pandoc/ImageSize.hs
@@ -59,8 +59,7 @@ import Numeric (showFFloat)
import Text.Pandoc.Definition
import Text.Pandoc.Options
import qualified Data.Map as M
-import Text.Pandoc.Compat.Except
-import Control.Monad.Trans
+import Control.Monad.Except
import Data.Maybe (fromMaybe)
-- quick and dirty functions to get image sizes
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)