Skip to content

Commit

Permalink
Add development flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Heli Wang committed Dec 16, 2017
1 parent 93886ff commit 47a879e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ Or pull things up in ghci with:

stack ghci

## Contributing

If you'd like to contribute to the repo, use the above installation instructions to get started.

When you're ready, make sure that the code compiles with the `Development` flag, i.e.:

stack build --flag queryparser:development

## Use

Expand Down
15 changes: 13 additions & 2 deletions queryparser.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ build-type: Simple
-- Constraint on the version of Cabal needed to build this package.
cabal-version: >=1.10

flag development {
description: Enable development level of strictness
default: False
manual: True
}

library
-- Modules exported by the library.
Expand Down Expand Up @@ -104,7 +109,10 @@ library
hs-source-dirs: src


ghc-options: -Wall -Werror
ghc-options: -Wall

if flag(development)
ghc-options: -Werror

-- Base language which the package is written in.
default-language: Haskell2010
Expand All @@ -118,7 +126,10 @@ benchmark queryparser-bench
, text
hs-source-dirs: bench

ghc-options: -Wall -Werror -with-rtsopts=-M5M
ghc-options: -Wall -with-rtsopts=-M5M

if flag(development)
ghc-options: -Werror

default-language: Haskell2010
default-extensions: OverloadedStrings
Expand Down

0 comments on commit 47a879e

Please sign in to comment.