[Haskell-cafe] Using Cabal during development

Rahul Kapoor rk at trie.org
Tue Feb 9 13:49:35 EST 2010


> Then how does the 'Executable' section of your .cabal look like? That's what
> I can't get working.

Suitably elided.

Executable test
  hs-source-dirs:       src, tests
  other-modules:        Text.Yaml.Yay, Text.Yaml.Yay.Syck
  main-is:              Main.hs
  build-depends:        base, HsSyck, syb
 if flag(test)
    build-depends:      QuickCheck >= 2.1 && < 2.2,
                        test-framework-quickcheck2 >= 0.2 && < 0.3,
                        test-framework >= 0.2 && < 0.3
  else
    buildable:          False



Library
  Hs-Source-Dirs:       src
  Exposed-Modules:      Text.Yaml.Yay, Text.Yaml.Yay.Syck
  Other-Modules:        Text.Yaml.Yay.Internal.Utils,
Text.Yaml.Yay.Syck.Encoder, Text.Yaml.Yay.Syck.Decoder
  Build-Depends:        base, HsSyck, syb
  if flag(test)
    -- Faster builds
    ghc-options:        -O0
  else
    -- Optimized builds
    ghc-options:        -O2
  if flag(nolib)
    buildable:          False


More information about the Haskell-Cafe mailing list