-
Notifications
You must be signed in to change notification settings - Fork 34
/
fb-util.cabal
446 lines (423 loc) · 11.8 KB
/
fb-util.cabal
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
cabal-version: 3.6
-- Copyright (c) Facebook, Inc. and its affiliates.
name: fb-util
version: 0.1.0.0
synopsis: Various utility libraries
homepage: https://github.com/facebookincubator/hsthrift
bug-reports: https://github.com/facebookincubator/hsthrift/issues
license: BSD-3-Clause
license-file: LICENSE
author: Facebook, Inc.
maintainer: hsthrift-team@fb.com
copyright: (c) Facebook, All Rights Reserved
category: Utilities
build-type: Simple
extra-source-files: CHANGELOG.md,
cpp/*.h,
tests/DynamicHelper.h,
tests/HsStructHelper.h,
hsc.h
description:
NOTE: for build instructions, see
https://github.com/facebookincubator/hsthrift
source-repository head
type: git
location: https://github.com/facebookincubator/hsthrift.git
common fb-haskell
default-language: Haskell2010
default-extensions:
BangPatterns
BinaryLiterals
DataKinds
DeriveDataTypeable
DeriveGeneric
EmptyCase
ExistentialQuantification
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NoMonomorphismRestriction
OverloadedStrings
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeFamilies
TypeSynonymInstances
NondecreasingIndentation
if flag(opt)
ghc-options: -O2
common fb-cpp
cxx-options: -std=c++17
if !flag(clang)
cxx-options: -fcoroutines
if arch(x86_64)
cxx-options: -march=haswell
if flag(opt)
cxx-options: -O3
flag opt
default: False
flag clang
default: False
library
import: fb-haskell, fb-cpp
exposed-modules:
Compat.Prettyprinter
Compat.Prettyprinter.Util
Compat.Prettyprinter.Render.Text
Control.Concurrent.Stream
Control.Trace
Control.Trace.Core
Control.Trace.VLog
Data.MovingAverageRateLimiter
Data.RateLimiterMap
Foreign.CPP.Addressable
Foreign.CPP.Dynamic
Foreign.CPP.HsStruct
Foreign.CPP.HsStruct.HsArray
Foreign.CPP.HsStruct.HsOption
Foreign.CPP.HsStruct.HsSet
Foreign.CPP.HsStruct.HsStdTuple
Foreign.CPP.HsStruct.HsMap
Foreign.CPP.HsStruct.HsStdVariant
Foreign.CPP.HsStruct.Types
Foreign.CPP.HsStruct.Unsafe
Foreign.CPP.HsStruct.Utils
Foreign.CPP.Marshallable
Foreign.CPP.Marshallable.TH
Util.ASan
Util.Async
Util.Aeson
Util.AllocLimit
Util.Applicative
Util.Bag
Util.Binary.Parser
Util.Bits
Util.Buffer
Util.Build
Util.ByteString
Util.Concurrent
Util.Control.Exception
Util.Control.Exception.CallStack
Util.Control.Monad
Util.Defer
-- Util.Dll
Util.Encoding
Util.Err
Util.EventBase
Util.Executor
Util.Fd
Util.FFI
Util.FilePath
Util.Function
Util.Graph
-- Util.GFlags
Util.HSE
Util.HUnit
Util.HashMap.Strict
Util.IO
Util.IOBuf
Util.JSON.Pretty
Util.Lens
Util.Linter
Util.List
Util.List.HigherOrder
Util.Log
Util.Log.Text
Util.Log.Internal
Util.Log.String
Util.LogIfSlow
Util.Logger
Util.MD5
Util.Memory
Util.Monoid
Util.Network
Util.OptParse
Util.Predicate
Util.PrettyPrint
Util.RWVar
Util.Reader
Util.STM
Util.Show
Util.String
Util.String.Quasi
Util.Testing
Util.Text
Util.Time
Util.TimeSec
Util.Timing
Util.ToExp
Util.Typeable
Util.WBVar
cxx-sources:
cpp/cdynamic.cpp
cpp/ffi.cpp
cpp/logging.cpp
cpp/HsStruct.cpp
cpp/IOBuf.cpp
cpp/EventBaseDataplane.cpp
cpp/Executor.cpp
Util/AsanAlloc.cpp
-- Util/GFlags.cpp
install-includes:
cpp/HsOption.h
cpp/HsStdTuple.h
cpp/HsStdVariant.h
cpp/HsStruct.h
cpp/HsStructDefines.h
cpp/ffi.h
cpp/memory.h
cpp/wrap.h
Util/AsanAlloc.h
include-dirs: .
hs-source-dirs: .
build-depends:
atomic-primops,
aeson,
attoparsec,
bytestring-lexing,
clock,
concurrent-extra,
exceptions,
ghc,
HUnit ^>= 1.6.1,
json,
lens,
lifted-base,
mangle,
monad-control,
primitive,
text-show,
optparse-applicative,
extra,
aeson-pretty,
either,
QuickCheck,
scientific,
haskell-src-exts,
some,
stm,
base >=4.11.1.0 && <4.17,
containers >=0.5.11 && <0.7,
text ^>=1.2.3.0,
ghci >=8.4.3 && <9.3,
binary ^>=0.8.5.1,
bytestring >=0.10.8.2 && <0.12,
hashable >=1.2.7.0 && <1.5,
unordered-containers ^>=0.2.9.0,
transformers ^>=0.5.5.0,
time >=1.8.0.2 && <1.12,
deepseq ^>=1.4.3.0,
filepath ^>=1.4.2,
async ^>=2.2.1,
split ^>=0.2.3.3,
directory ^>=1.3.1.5,
unix ^>=2.7.2.2,
process ^>=1.6.3.0,
vector >=0.12.0.1 && <0.14,
pretty ^>=1.1.3.6,
template-haskell >=2.13 && <2.19,
integer-gmp >=1.0.2.0 && <1.2,
mtl ^>=2.2.2,
array ^>=0.5.2.0,
prettyprinter >=1.2.1 && <1.7,
data-default,
build-tool-depends: hsc2hs:hsc2hs
-- We use hsc2hs with C++ headers, so we need to compile the
-- generated code with g++. The hsc2hs-generated binary is linked
-- by ghc, because we depend on a Haskell package (mangle).
hsc2hs-options: --cc=g++ --lflag=-lstdc++ --cflag=-D__HSC2HS__=1 --cflag=-std=c++17
pkgconfig-depends: libfolly, libglog, libevent, fmt, gflags
extra-libraries: double-conversion
common test-common
extra-libraries: stdc++
ghc-options: -threaded
hs-source-dirs: tests, tests/github
other-modules: SpecRunner
build-depends: base,
aeson,
async,
binary,
bytestring,
containers,
directory,
fb-util,
fb-stubs,
filepath,
hspec,
hspec-contrib,
HUnit ^>= 1.6.1,
json,
lens,
mtl,
optparse-applicative,
prettyprinter,
QuickCheck,
regex-base,
regex-pcre,
scientific,
template-haskell,
temporary,
text,
text-show,
transformers,
unordered-containers,
vector
build-tool-depends: hsc2hs:hsc2hs
-- We use hsc2hs with C++ headers, so we need to compile the
-- generated code with g++. The hsc2hs-generated binary is linked
-- by ghc.
hsc2hs-options: --cc=g++ --lflag=-lstdc++ --cflag=-D__HSC2HS__=1 --cflag=-std=c++17
test-suite stream
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: StreamTest.hs
ghc-options: -main-is StreamTest
test-suite movavgrl
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: MovingAverageRateLimiterTest.hs
ghc-options: -main-is MovingAverageRateLimiterTest
test-suite rlmap
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: RateLimiterMapTest.hs
ghc-options: -main-is RateLimiterMapTest
test-suite iobuf
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: IOBufTest.hs
ghc-options: -main-is IOBufTest
cxx-sources: tests/IOBufTest.cpp
test-suite alloc-limit
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: AllocLimitTest.hs
ghc-options: -main-is AllocLimitTest
test-suite unit-tests
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: UnitTests.hs
ghc-options: -main-is UnitTests
test-suite rwvar
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: RWVarTest.hs
ghc-options: -main-is RWVarTest
test-suite th
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: THTest.hs
ghc-options: -main-is THTest
test-suite filepath
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: FilePathTest.hs
ghc-options: -main-is FilePathTest
test-suite optparse
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: OptParseTest.hs
ghc-options: -main-is OptParseTest
test-suite lens
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: LensTest.hs
ghc-options: -main-is LensTest
test-suite toexp
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: ToExpTest.hs
ghc-options: -main-is ToExpTest
test-suite aeson
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: AesonTest.hs
ghc-options: -main-is AesonTest
test-suite buffer
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: BufferTest.hs
ghc-options: -main-is BufferTest
test-suite exception
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: ExceptionTest.hs
ghc-options: -main-is ExceptionTest
test-suite control-exception
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: ControlExceptionTest.hs
ghc-options: -main-is ControlExceptionTest
test-suite json-pretty
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: JSONPrettyTest.hs
ghc-options: -main-is JSONPrettyTest
test-suite io
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: IOTest.hs
ghc-options: -main-is IOTest
test-suite time-sec
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: TimeSecTest.hs
ghc-options: -main-is TimeSecTest
test-suite list
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: ListTest.hs
ghc-options: -main-is ListTest
test-suite graph
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: GraphTest.hs
ghc-options: -main-is GraphTest
test-suite concurrent
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: ConcurrentTest.hs
ghc-options: -main-is ConcurrentTest
test-suite md5
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: MD5Test.hs
ghc-options: -main-is MD5Test
test-suite control-monad
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: Control/MonadTest.hs
ghc-options: -main-is Control.MonadTest
test-suite string-quasi
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: StringQuasiTest.hs
ghc-options: -main-is StringQuasiTest
test-suite dynamic
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: DynamicTest.hs
cxx-sources: tests/DynamicHelper.cpp
ghc-options: -main-is DynamicTest
test-suite hs-struct
import: fb-haskell, fb-cpp, test-common
type: exitcode-stdio-1.0
main-is: HsStructTest.hs
other-modules: HsStructTestTypes
cxx-sources: tests/HsStructHelper.cpp
ghc-options: -main-is HsStructTest
build-depends: extra
-- TODO: commented out because of a linker problem
-- test-suite gflags
-- import: fb-haskell, fb-cpp, test-common
-- type: exitcode-stdio-1.0
-- main-is: GFlagsTest.hs
-- ghc-options: -main-is GFlagsTest
-- cxx-sources: tests/GFlagsTest.cpp