cabal-dev configure --flags=developer
cabal-dev build
cabal-dev ghci
> import Test.Test
> runTests
Created
January 7, 2014 21:31
-
-
Save yanatan16/8307247 to your computer and use it in GitHub Desktop.
A cabal-dev workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sample | |
version: 0.1.0.0 | |
-- synopsis: | |
-- description: | |
-- homepage: | |
-- license: | |
-- license-file: | |
-- author: | |
-- maintainer: | |
-- copyright: | |
-- category: | |
stability: experimental | |
build-type: Simple | |
cabal-version: >=1.8 | |
-- This is where the magic happens | |
flag developer | |
description: operate in developer mode | |
default: False | |
-- Your usual test suite | |
test-suite tests | |
type: exitcode-stdio-1.0 | |
main-is: tests/Main.hs | |
hs-source-dirs: tests | |
other-modules: Test.Test | |
build-depends: sample, base | |
test-framework >= 0.2.0, | |
test-framework-quickcheck2 >= 0.2.0, QuickCheck >= 2, | |
test-framework-hunit >= 0.2.0, HUnit >= 1.2 && < 2 | |
library | |
exposed-modules: Data.YourModule | |
hs-source-dirs: src | |
build-depends: base | |
if flag(developer) | |
hs-source-dirs: tests | |
other-modules: Test.Test | |
build-depends: test-framework >= 0.2.0, | |
test-framework-quickcheck2 >= 0.2.0, QuickCheck >= 2, | |
test-framework-hunit >= 0.2.0, HUnit >= 1.2 && < 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment