From bae9a65960268dd6dc7cc45a7a7030e9b42db93f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 15 Nov 2016 22:01:55 -0400 Subject: allow Utility.Exception to still be used when not building with cabal --- Utility/Exception.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Utility') 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 -- cgit v1.2.3