Clarify why we can't run .bat files
[cabal.git] / cabal-install-solver / src-assertion / Distribution / Client / Utils / Assertion.hs
blob05dc0e8fe54b99ec837d67dca75f891e57a208f1
1 {-# LANGUAGE CPP #-}
2 module Distribution.Client.Utils.Assertion (expensiveAssert) where
5 #ifdef DEBUG_EXPENSIVE_ASSERTIONS
6 import Prelude (Bool)
7 import Control.Exception (assert)
8 import Distribution.Compat.Stack
9 #else
10 import Prelude (Bool, id)
11 #endif
13 -- | Like 'assert', but only enabled with -fdebug-expensive-assertions. This
14 -- function can be used for expensive assertions that should only be turned on
15 -- during testing or debugging.
16 #ifdef DEBUG_EXPENSIVE_ASSERTIONS
17 expensiveAssert :: WithCallStack (Bool -> a -> a)
18 expensiveAssert = assert
19 #else
20 expensiveAssert :: Bool -> a -> a
21 expensiveAssert _ = id
22 #endif