allow Utility.Exception to still be used when not building with cabal
This commit is contained in:
parent
d2b49090b8
commit
2493c2c5a4
1 changed files with 4 additions and 0 deletions
|
@ -46,11 +46,15 @@ import Utility.Data
|
||||||
- where there's a problem that the user is excpected to see in some
|
- where there's a problem that the user is excpected to see in some
|
||||||
- circumstances. -}
|
- circumstances. -}
|
||||||
giveup :: [Char] -> a
|
giveup :: [Char] -> a
|
||||||
|
#ifdef MIN_VERSION_base
|
||||||
#if MIN_VERSION_base(4,9,0)
|
#if MIN_VERSION_base(4,9,0)
|
||||||
giveup = errorWithoutStackTrace
|
giveup = errorWithoutStackTrace
|
||||||
#else
|
#else
|
||||||
giveup = error
|
giveup = error
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
giveup = error
|
||||||
|
#endif
|
||||||
|
|
||||||
{- Catches IO errors and returns a Bool -}
|
{- Catches IO errors and returns a Bool -}
|
||||||
catchBoolIO :: MonadCatch m => m Bool -> m Bool
|
catchBoolIO :: MonadCatch m => m Bool -> m Bool
|
||||||
|
|
Loading…
Add table
Reference in a new issue