Commit 2f9e01d4 authored by kristenk's avatar kristenk Committed by Mikhail Glushenkov
Browse files

Add callstack to 'debugAssert'.

parent 631a137b
......@@ -5,10 +5,12 @@ module Distribution.Client.Utils.Assertion (debugAssert) where
import Control.Exception (assert)
#endif
import Distribution.Compat.Stack
-- | Like 'assert', but only enabled with -fdebug-assertions. This function can
-- be used for expensive assertions that should only be turned on during testing
-- or debugging.
debugAssert :: Bool -> a -> a
debugAssert :: WithCallStack (Bool -> a -> a)
#ifdef DEBUG_ASSERTIONS
debugAssert = assert
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment