on master help sign in
Define the cpp macro DEBUG when debug flag is on
commit6c934ae2d1b02d7ca04d9b10911b6ca6ea5f3646 authorHarendra Kumar <harendra@composewell.com> dateMon 21 Aug 2023, 18:54 (3 years ago) parent76a6db5
3 files changed+3
core/src/Streamly/Internal/Data/MutByteArray/Type.hs+1 core/streamly-core.cabal+1 streamly.cabal+1
core/src/Streamly/Internal/Data/MutByteArray/Type.hs+1
@@ -39,6 +39,7 @@ module Streamly.Internal.Data.MutByteArray.Type
3939
4040import Control.Monad.IO.Class (MonadIO(..))
4141#ifdef DEBUG
42+import Control.Monad (when)
4243import Debug.Trace (trace)
4344#endif
4445import GHC.Base (IO(..))
core/streamly-core.cabal+1
@@ -224,6 +224,7 @@ common optimization-options
224224
225225 -- For this to be effective it must come after the -O2 option
226226 if flag(dev) || flag(debug) || !flag(opt)
227+ cpp-options: -DDEBUG
227228 ghc-options: -fno-ignore-asserts
228229
229230common threading-options
streamly.cabal+1
@@ -332,6 +332,7 @@ common optimization-options
332332 -- For this to be effective it must come after the -O2 option
333333 if flag(dev) || flag(debug) || !flag(opt)
334334 ghc-options: -fno-ignore-asserts
335+ cpp-options: -DDEBUG
335336
336337common threading-options
337338 ghc-options: -threaded