module UHC.Util.Error
(
# if __GLASGOW_HASKELL__ >= 710
module Control.Monad.Except
, Error(..)
, ErrorT
, runErrorT
, withErrorT
, mapErrorT
, runError
, withError
, mapError
# else
module Control.Monad.Error
# endif
)
where
#if __GLASGOW_HASKELL__ >= 710
import Control.Monad.Except
#else
import Control.Monad.Error
#endif
#if __GLASGOW_HASKELL__ >= 710
type ErrorT = ExceptT
runErrorT = runExceptT
withErrorT = withExceptT
mapErrorT = mapExceptT
runError = runExcept
withError = withExcept
mapError = mapExcept
class Error a where
noMsg :: a
strMsg :: String -> a
noMsg = strMsg ""
strMsg _ = noMsg
#else
#endif