Define the cpp macro DEBUG when debug flag is on

This commit is contained in:
Harendra Kumar 2023-08-21 18:54:36 +05:30
parent 76a6db56fe
commit 6c934ae2d1
3 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,7 @@ module Streamly.Internal.Data.MutByteArray.Type
import Control.Monad.IO.Class (MonadIO(..))
#ifdef DEBUG
import Control.Monad (when)
import Debug.Trace (trace)
#endif
import GHC.Base (IO(..))

View File

@ -224,6 +224,7 @@ common optimization-options
-- For this to be effective it must come after the -O2 option
if flag(dev) || flag(debug) || !flag(opt)
cpp-options: -DDEBUG
ghc-options: -fno-ignore-asserts
common threading-options

View File

@ -332,6 +332,7 @@ common optimization-options
-- For this to be effective it must come after the -O2 option
if flag(dev) || flag(debug) || !flag(opt)
ghc-options: -fno-ignore-asserts
cpp-options: -DDEBUG
common threading-options
ghc-options: -threaded