allow Utility.Exception to still be used when not building with cabal

This commit is contained in:
Joey Hess 2016-11-15 22:01:55 -04:00
parent d2b49090b8
commit 2493c2c5a4
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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