-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcommon.cabal.in
44 lines (41 loc) · 1.04 KB
/
common.cabal.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- begin common stanzas
Flag dev
Description:
Set compile flags for development.
Default: False
Manual: True
Flag release
Description:
Set compile flags for release-checking. Users don't need this.
Default: False
Manual: True
Common generic
Default-Language: Haskell2010
Build-Depends: base >= 4 && < 5,
GHC-Options:
-Wall
-Wcompat
-Wno-unused-matches
-Wredundant-constraints
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wunused-packages
if flag(dev)
GHC-Options:
-O2
-- some optimisations cause memory leaks; switch on -O2 and profiling so we
-- can detect this during development so it doesn't cause surprises later
GHC-Prof-Options:
-fprof-auto
-- note: blanket-adding -fprof-auto like this can very occasionally give
-- memory leaks; disable those on a per-module basis.
if flag(release)
GHC-Options:
-Werror
Common executable
GHC-Options:
-threaded
if flag(dev)
GHC-Options:
-rtsopts
-- end common stanzas