allow Utility.Exception to still be used when not building with cabal
authorJoey Hess <joeyh@joeyh.name>
Wed, 16 Nov 2016 02:01:55 +0000 (22:01 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 16 Nov 2016 02:01:55 +0000 (22:01 -0400)
Utility/Exception.hs

index 5cd8fd19976fc846a33a16616719891882904f11..67c2e85d81faf07ba9a03d9bfcd6fc098189b2fc 100644 (file)
@@ -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