@@ -1,3 +1,4 @@
1+{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-}
12{-
23Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu>
34
@@ -33,6 +34,9 @@ module Text.Pandoc.Error (PandocError(..), handleError) where
3334import Text.Parsec.Error
3435import Text.Parsec.Pos hiding (Line)
3536import Text.Pandoc.Compat.Except
37+import GHC.Generics (Generic)
38+import Data.Generics (Data, Typeable)
39+import Control.Exception (Exception)
3640
3741type Input = String
3842
@@ -40,8 +44,9 @@ data PandocError = -- | Generic parse failure
4044 ParseFailure String
4145 -- | Error thrown by a Parsec parser
4246 | ParsecError Input ParseError
43− deriving (Show)
47+ deriving (Show, Typeable, Generic)
4448
49+instance Exception PandocError
4550
4651instance Error PandocError where
4752 strMsg = ParseFailure