2 module Distribution
.Client
.Utils
.Assertion
(expensiveAssert
) where
5 #ifdef DEBUG_EXPENSIVE_ASSERTIONS
7 import Control
.Exception
(assert
)
8 import Distribution
.Compat
.Stack
10 import Prelude
(Bool, id)
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
20 expensiveAssert
:: Bool -> a
-> a
21 expensiveAssert _
= id