{-# LANGUAGE CPP #-}
module Distribution.Client.Utils.Assertion (expensiveAssert) where
#ifdef DEBUG_EXPENSIVE_ASSERTIONS
import Prelude (Bool)
import Control.Exception (assert)
import Distribution.Compat.Stack
#else
import Prelude (Bool, id)
#endif
#ifdef DEBUG_EXPENSIVE_ASSERTIONS
expensiveAssert :: WithCallStack (Bool -> a -> a)
expensiveAssert = assert
#else
expensiveAssert :: Bool -> a -> a
expensiveAssert :: forall a. Bool -> a -> a
expensiveAssert Bool
_ = a -> a
forall a. a -> a
id
#endif