Ajout : */hcompta-*.cabal : -fdev
authorJulien Moutinho <julm+hcompta@autogeree.net>
Mon, 18 May 2015 15:48:54 +0000 (17:48 +0200)
committerJulien Moutinho <julm+hcompta@autogeree.net>
Tue, 19 May 2015 05:33:11 +0000 (07:33 +0200)
cli/hcompta-cli.cabal
lib/hcompta-lib.cabal

index 1520a9feaf09cc87cc82cb06d72835d491debe70..4d1cf0b94e1452d62d46635a13327bfdc5298cf5 100644 (file)
@@ -26,20 +26,24 @@ Flag dev
   Description: Turn on development settings.
   Default:     False
 
+Flag dump
+  Default:     False
+  Description: Dump some intermediate files.
+  Manual:      True
+
 Flag library-only
   Description: Build only library
   Default:     False
 
 Library
+  ghc-options: -Wall -fno-warn-tabs
   if flag(dev)
     cpp-options: -DDEVELOPMENT
-    ghc-options: -Wall -fno-warn-tabs --disable-optimization
-    -- -ddump-splices
-    -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
-    -- -fno-warn-type-defaults -fno-warn-orphans
+    ghc-options:
   else
-    ghc-options: -Wall -fno-warn-tabs
-    -- -O2
+    ghc-options: -O2
+  if flag(dump)
+    ghc-options: -ddump-simple -ddump-stg -ddump-to-file
   -- default-language: Haskell2010
   exposed-modules:
     Hcompta.CLI
@@ -63,9 +67,15 @@ Library
                    -- NOTE: needed for Control.Monad.Trans.Except
 
 Executable hcompta-cli
+  ghc-options: -Wall -fno-warn-tabs
+  ghc-options: -threaded -rtsopts -with-rtsopts=-N
+  if flag(dev)
+    cpp-options: -DDEVELOPMENT
+    ghc-options:
+  else
+    ghc-options: -O2
   if flag(library-only)
     Buildable: False
-
   main-is: Hcompta/CLI/Main.hs
   hs-source-dirs: .
   build-depends:
@@ -81,9 +91,6 @@ Executable hcompta-cli
     , transformers >= 0.4 && < 0.5
                    -- NOTE: needed for Control.Monad.Trans.Except
 
-  ghc-options: -threaded -rtsopts -with-rtsopts=-N
-    -- -O2
-
 
 test-suite Test
   type: exitcode-stdio-1.0
index a1e4ff652c1cca74c606a1543586e9dcfc0a81e3..dd9cdf52680a199b7d1ccd7fd1a8766e68657bf4 100644 (file)
@@ -19,29 +19,36 @@ tested-with: GHC==7.8.4
 version: 0.0.0
 
 source-repository head
-  type:     git
   location: git://git.autogeree.net/hcompta
+  type:     git
 
 Flag dev
-  Description: Turn on development settings.
   Default:     False
+  Description: Turn on development settings.
 
 Flag double
+  Default:     False
   Description: Use old Double number representation (instead of Decimal), for testing/benchmarking.
+
+Flag dump
   Default:     False
+  Description: Dump some intermediate files.
+  Manual:      True
 
 Library
+  ghc-options: -Wall -fno-warn-tabs
   if flag(dev)
     cpp-options: -DDEVELOPMENT
-    ghc-options: -Wall -fno-warn-tabs --disable-optimization
+    ghc-options:
     -- -ddump-splices
     -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
     -- -fno-warn-type-defaults -fno-warn-orphans
   else
-    ghc-options: -Wall -fno-warn-tabs
-    -- -O2
+    ghc-options: -O2
   if flag(double)
     cpp-options: -DDOUBLE
+  if flag(dump)
+    ghc-options: -ddump-simple -ddump-stg -ddump-to-file
   -- default-language: Haskell2010
   exposed-modules:
     Hcompta