diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-15 22:01:55 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-15 22:01:55 -0400 |
commit | bae9a65960268dd6dc7cc45a7a7030e9b42db93f (patch) | |
tree | 49581f4279d92a9dec345123ade49d265380d512 /Utility | |
parent | c485a83f833c849ef8fa20c960ab814e902c7933 (diff) |
allow Utility.Exception to still be used when not building with cabal
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Exception.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/Exception.hs b/Utility/Exception.hs index 5cd8fd199..67c2e85d8 100644 --- a/Utility/Exception.hs +++ b/Utility/Exception.hs @@ -46,11 +46,15 @@ import Utility.Data - where there's a problem that the user is excpected to see in some - circumstances. -} giveup :: [Char] -> a +#ifdef MIN_VERSION_base #if MIN_VERSION_base(4,9,0) giveup = errorWithoutStackTrace #else giveup = error #endif +#else +giveup = error +#endif {- Catches IO errors and returns a Bool -} catchBoolIO :: MonadCatch m => m Bool -> m Bool |