From: Joey Hess Date: Wed, 16 Nov 2016 02:01:55 +0000 (-0400) Subject: allow Utility.Exception to still be used when not building with cabal X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~283^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2493c2c5a43b5ea869be3fe982f767d8b5e97703;p=git-annex.git allow Utility.Exception to still be used when not building with cabal --- diff --git a/Utility/Exception.hs b/Utility/Exception.hs index 5cd8fd1997..67c2e85d81 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