Actually remove T/P/Compat/Except.
This commit is contained in:
parent
121e3dfb64
commit
7ea16ad058
1 changed files with 0 additions and 37 deletions
|
@ -1,37 +0,0 @@
|
||||||
{-# LANGUAGE CPP #-}
|
|
||||||
module Text.Pandoc.Compat.Except ( ExceptT
|
|
||||||
, Except
|
|
||||||
, Error(..)
|
|
||||||
, runExceptT
|
|
||||||
, runExcept
|
|
||||||
, MonadError
|
|
||||||
, throwError
|
|
||||||
, catchError )
|
|
||||||
where
|
|
||||||
|
|
||||||
#if MIN_VERSION_mtl(2,2,1)
|
|
||||||
import Control.Monad.Except
|
|
||||||
|
|
||||||
class Error a where
|
|
||||||
noMsg :: a
|
|
||||||
strMsg :: String -> a
|
|
||||||
|
|
||||||
noMsg = strMsg ""
|
|
||||||
strMsg _ = noMsg
|
|
||||||
|
|
||||||
#else
|
|
||||||
import Control.Monad.Error
|
|
||||||
import Control.Monad.Identity (Identity, runIdentity)
|
|
||||||
|
|
||||||
type ExceptT = ErrorT
|
|
||||||
|
|
||||||
type Except s a = ErrorT s Identity a
|
|
||||||
|
|
||||||
runExceptT :: ExceptT e m a -> m (Either e a)
|
|
||||||
runExceptT = runErrorT
|
|
||||||
|
|
||||||
runExcept :: ExceptT e Identity a -> Either e a
|
|
||||||
runExcept = runIdentity . runExceptT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue