Commit 062c13c1 authored by md9ms's avatar md9ms
Browse files

Remove -DDEBUG from OPTIONS pragmas

If you don't actually have HUnit installed, it's a pain in the butt
to pass -i parameters or -package-conf parameters to ghci when you
just want to check something in a module or another. Makes more sense
to require -DDEBUG on the command line. Also, I changed the Makefile
to define -DDEBUG when building moduleTest, so that should still work.
parent 1b822b4c
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Misc
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Package
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Build
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Configure
......@@ -46,9 +46,11 @@ module Distribution.Simple.Configure (writePersistBuildConfig,
getPersistBuildConfig,
LocalBuildInfo(..),
configure,
hunitTests,
localBuildInfoFile,
exeDeps
exeDeps,
#ifdef DEBUG
hunitTests
#endif
)
where
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Install
......@@ -46,7 +46,7 @@ module Distribution.Simple.Install (
install,
mkImportDir,
#ifdef DEBUG
,hunitTests
hunitTests
#endif
) where
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Register
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.SrcDist
......
{-# OPTIONS -cpp -DDEBUG #-}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Utils
......@@ -56,13 +56,15 @@ module Distribution.Simple.Utils (
rawSystemPathExit,
moveSources,
moduleToFilePath,
hunitTests,
createIfNotExists,
mkLibName,
copyFile,
pathJoin,
removeFileRecursive,
splitExt
splitExt,
#ifdef DEBUG
hunitTests
#endif
) where
import Distribution.Package (PackageDescription(..), showPackageId)
......
......@@ -55,7 +55,9 @@ module Distribution.Version (
withinRange,
showVersionRange,
parseVersionRange,
#ifdef DEBUG
hunitTests
#endif
) where
import Data.List ( intersperse )
......@@ -64,7 +66,9 @@ import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Language
import qualified Text.ParserCombinators.Parsec.Token as P
#ifdef DEBUG
import HUnit
#endif
-- -----------------------------------------------------------------------------
-- The Version type
......@@ -328,6 +332,7 @@ reserved = P.reserved lexer
reservedOp :: String -> CharParser st ()
reservedOp = P.reservedOp lexer
#ifdef DEBUG
-- ------------------------------------------------------------
-- * Testing
-- ------------------------------------------------------------
......@@ -409,4 +414,5 @@ hunitTests
~: False
~=? release3 `withinRange` (orEarlierVersion release2)
]
#endif
......@@ -59,7 +59,7 @@ hunitInstall-stamp: hunit-stamp
# testing...
moduleTest:
ghc $(GHCFLAGS) Distribution/ModuleTest -o moduleTest
ghc $(GHCFLAGS) -DDEBUG Distribution/ModuleTest -o moduleTest
tests: moduleTest clean
cd test/A && make clean
......
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