Added warning about unused binds to the compiler options

I have added my favourite compiler option "-fwarn-unused-binds" to the Makefile.  I've then changed GenerateCPPCSP to have one explicit export, and the
combination of the two would spot any future mistakes like not including the genAlt function in then GenOps structure (see previous patch).  This 
new warning option already spots one problem with GenerateC, and I have a feeling it will also be useful in future.
This commit is contained in:
Neil Brown 2007-08-06 20:33:48 +00:00
parent 5cfa79809b
commit 0a0110d122
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
-- | Generate C code from the mangled AST. -- | Generate C code from the mangled AST.
module GenerateCPPCSP where module GenerateCPPCSP (generateCPPCSP) where
import Data.Char import Data.Char
import Data.List import Data.List

View File

@ -28,7 +28,7 @@ sources = \
# profile_opts = -prof -auto-all # profile_opts = -prof -auto-all
$(targets): $(sources) $(targets): $(sources)
ghc -fglasgow-exts -fallow-undecidable-instances $(profile_opts) -o tock --make Main ghc -fglasgow-exts -fallow-undecidable-instances -fwarn-unused-binds $(profile_opts) -o tock --make Main
CFLAGS = \ CFLAGS = \
-O2 \ -O2 \