on master help sign in
Define the cpp macro DEBUG when debug flag is on
6c934aeHarendra Kumar
core/src/Streamly/Internal/Data/MutByteArray/Type.hs+1
@@ -39,6 +39,7 @@ module Streamly.Internal.Data.MutByteArray.Type
39
39
40import Control.Monad.IO.Class (MonadIO(..))
40import Control.Monad.IO.Class (MonadIO(..))
41#ifdef DEBUG
41#ifdef DEBUG
42+import Control.Monad (when)
42import Debug.Trace (trace)
43import Debug.Trace (trace)
43#endif
44#endif
44import GHC.Base (IO(..))
45import GHC.Base (IO(..))
core/streamly-core.cabal+1
@@ -224,6 +224,7 @@ common optimization-options
224
224
225 -- For this to be effective it must come after the -O2 option
225 -- For this to be effective it must come after the -O2 option
226 if flag(dev) || flag(debug) || !flag(opt)
226 if flag(dev) || flag(debug) || !flag(opt)
227+ cpp-options: -DDEBUG
227 ghc-options: -fno-ignore-asserts
228 ghc-options: -fno-ignore-asserts
228
229
229common threading-options
230common threading-options
streamly.cabal+1
@@ -332,6 +332,7 @@ common optimization-options
332 -- For this to be effective it must come after the -O2 option
332 -- For this to be effective it must come after the -O2 option
333 if flag(dev) || flag(debug) || !flag(opt)
333 if flag(dev) || flag(debug) || !flag(opt)
334 ghc-options: -fno-ignore-asserts
334 ghc-options: -fno-ignore-asserts
335+ cpp-options: -DDEBUG
335
336
336common threading-options
337common threading-options
337 ghc-options: -threaded
338 ghc-options: -threaded