-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.yaml
295 lines (280 loc) · 7.36 KB
/
package.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
name: pyrethrum
version: 0.1.0.0
github: "githubuser/simple-hpack"
license: MIT
author: "Author name here"
maintainer: "[email protected]"
copyright: "2018 Author name here"
extra-source-files:
- README.md
- ChangeLog.md
# Metadata used when publishing your package
# synopsis: Short description of your package
# category: Web
# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
description: Please see the README on GitHub at <https://github.com/githubuser/simple-hpack#readme>
# command line:
# development
# cabal build --flags="-optimised +godLibrary"
# test
# cabal ci --flags="+optimised -godLibrary"
flags:
# use God library for debugging now - https://www.haskellforall.com/2021/05/module-organization-guidelines-for.html
# can probably be depricated when HLS can live load multiple modules
godLibrary:
description: compile all modules (including tests) into one module
manual: true
default: true
optimised:
description: is the exe optimised
manual: true
default: false
verbatim:
- cabal-version: 3.6
- |
common optimisation
if flag(optimised)
ghc-options: -O2
else
ghc-options: -O0
- |
common testLibProps
build-depends:
tasty
, tasty-hunit
, tasty-hedgehog
, tasty-discover
, hedgehog
, bytestring
, falsify
hs-source-dirs:
test
- |
common pyrethrumProps
hs-source-dirs:
src
build-depends:
deepseq
, unordered-containers
, template-haskell
, fmt
- |
common libImports
if flag(godLibrary)
import:
testLibProps, optimisation
else
import:
optimisation
- |
common reludeImports
build-depends:
base
, relude
, pyrethrum-extras
mixins:
base hiding (Prelude),
relude (Relude as Prelude, Data.Text, Relude.Unsafe as Unsafe)
dependencies:
- aeson
- aeson-pretty
- base-prelude # needed for IOError
- bytestring
- chronos
- containers
- directory
- dlist
- exceptions
- effectful-core
- effectful
- effectful-plugin
- effectful-th
- extra
- hashable
- mtl
- path # - version set in extra deps - until can roll forward
- path-io # -
- pretty-show
- pyrethrum-extras
# since removing pyrelude
- text
- time # need for timezone which is missing from chronos
- transformers-either
- random
- raw-strings-qq
# - relude
- unliftio
- yaml
# used to talk to ghecko driver
# - http-client
# - http-types
- req
# - name: base
# mixin:
# - hiding (Prelude)
# - name: relude
# mixin:
# - (Relude as Prelude, Data.Text, Relude.Unsafe as Unsafe)
ghc-options:
# - -threaded
- -fmax-pmcheck-models=10000000
- -ferror-spans
- -fprint-potential-instances
# generate template haskell splices files
# - -ddump-splices
# - -dth-dec-file
# - -ddump-to-file
# threading related options only has an effect for exes
# - -threaded
# - -rtsopts
# - -with-rtsopts=-N
# - -O2
# - -Werror
# - *optimisation
- -Wall
- -Wcompat
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wredundant-constraints
- -fplugin=Effectful.Plugin
- -fwarn-tabs
- -fwrite-ide-info
# - -fno-warn-unused-imports
# - -fno-warn-missing-signatures
- -fno-warn-type-defaults
# - -fno-warn-unused-matches
# - -fno-warn-unused-binds
- -fno-warn-unused-do-bind
- -Wno-overlapping-patterns
# todo: more researchon this: https://well-typed.com/blog/2023/02/interface-files-with-core/
- -fprefer-byte-code
- -fbyte-code-and-object-code
# https://gitlab.haskell.org/ghc/ghc/-/issues/24278
- -fno-break-points
# this would be nice but seems to break ghcid
# - -Werror=prepositive-qualified-module
- -fdefer-type-errors
# profiling
# - -ddump-to-file
# - -ddump-timings
default-extensions:
- AllowAmbiguousTypes
- BangPatterns
- BlockArguments
- ConstrainedClassMethods
- ConstraintKinds
- DisambiguateRecordFields
- DuplicateRecordFields
- DataKinds
- DefaultSignatures
- DeriveFoldable
- DeriveFunctor
- DeriveGeneric
- DeriveLift
- DeriveTraversable
- DerivingStrategies
- EmptyCase
- ExistentialQuantification
- ExtendedDefaultRules
- FlexibleContexts
- FlexibleInstances
- FunctionalDependencies
- GADTs
- GeneralizedNewtypeDeriving
- ImportQualifiedPost
- InstanceSigs
- KindSignatures
- LambdaCase
- LiberalTypeSynonyms
- MultiParamTypeClasses
- MultiWayIf
- NamedFieldPuns
- NoFieldSelectors
- NumericUnderscores
- OverloadedStrings
- OverloadedRecordDot
- PartialTypeSignatures
- PatternSynonyms
- PolyKinds
- QuasiQuotes
- RankNTypes
- RecordWildCards
- ScopedTypeVariables
- StandaloneDeriving
- StrictData
- TemplateHaskell
- TupleSections
- TypeApplications
- TypeFamilies
- TypeFamilyDependencies
- TypeOperators
# internal-libraries:
# examples:
# ghc-options: -O0
# source-dirs:
# - examples
# # remove later
# - src
# dependencies:
# - unordered-containers
# - pyrethrum
# - template-haskell
# verbatim:
# import: reludeImports
# discover:
# # change optimisation and move later
# default-extensions:
# - FieldSelectors
# ghc-options: -O0
# visibility: public
# source-dirs:
# - discover
# # remove later
# dependencies:
# - algebraic-graphs ^>= 0.7
# - base ^>= 4.17.0.0 || ^>= 4.18.0.0
# - bytestring ^>= 0.10.9.0 || ^>= 0.11.0.0
# - containers ^>= 0.6.2.1
# - directory ^>= 1.3.3.2
# - filepath ^>= 1.4.2.1
# - generic-lens ^>= 2.2.0.0
# - ghc ^>= 9.4 || ^>= 9.6
# - lens
# - mtl ^>= 2.2.2 || ^>= 2.3
# - optparse-applicative
# - regex-tdfa ^>= 1.2.0.0 || ^>= 1.3.1.0
# - text ^>= 2.0.1
# - toml-reader ^>= 0.2.0.0
# - transformers ^>= 0.5.6.2 || ^>= 0.6
library:
when:
# https://github.com/sol/hpack#handling-of-paths_-modules
- condition: false
other-modules: Paths_pyrethrum
source-dirs:
- src
# remove later when finish most dev and move away from god modules
# TODO: God modules probably not required with latest cabal spilt fix once and for all
- test
- examples
dependencies:
- deepseq
- unordered-containers
- template-haskell
- fmt
# verbatum needs to go last otherwise exposed module inference does not work
verbatim:
import: libImports, pyrethrumProps, reludeImports
# tests:
# pyrethrum-test:
# main: Main.hs
# source-dirs:
# - test
# dependencies:
# - pyrethrum
# # verbatum needs to go last otherwise other module inference does not work
# verbatim:
# import: testLibProps, reludeImports
# build-tools: tasty-discover:tasty-discover