@@ -1,37 +0,0 @@
1−{-# LANGUAGE CPP #-}
2−module Text.Pandoc.Compat.Except ( ExceptT
3− , Except
4− , Error(..)
5− , runExceptT
6− , runExcept
7− , MonadError
8− , throwError
9− , catchError )
10− where
11−
12−#if MIN_VERSION_mtl(2,2,1)
13−import Control.Monad.Except
14−
15−class Error a where
16− noMsg :: a
17− strMsg :: String -> a
18−
19− noMsg = strMsg ""
20− strMsg _ = noMsg
21−
22−#else
23−import Control.Monad.Error
24−import Control.Monad.Identity (Identity, runIdentity)
25−
26−type ExceptT = ErrorT
27−
28−type Except s a = ErrorT s Identity a
29−
30−runExceptT :: ExceptT e m a -> m (Either e a)
31−runExceptT = runErrorT
32−
33−runExcept :: ExceptT e Identity a -> Either e a
34−runExcept = runIdentity . runExceptT
35−#endif
36−
37−