-
Notifications
You must be signed in to change notification settings - Fork 107
/
dex.cabal
393 lines (379 loc) · 13.2 KB
/
dex.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
cabal-version: 2.2
-- Copyright 2019 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
name: dex
version: 0.1.0.0
author: Dougal Maclaurin
maintainer: [email protected]
license-file: LICENSE
build-type: Simple
data-files: lib/*.dx
, static/dynamic.html
, static/index.js
, static/style.css
, src/lib/dexrt.bc
flag cuda
description: Enables building with CUDA support
default: False
flag optimized
description: Enables GHC optimizations
default: False
flag llvm-head
description: Use the bleeding-edge version of LLVM
default: False
flag foreign
description: Build the C interface to Dex
default: False
flag debug
description: Enable extra checks and stack trace printing (useful for developers)
default: False
library
exposed-modules: AbstractSyntax
, Algebra
, Builder
, CUDA
, CheapReduction
, CheckType
, ConcreteSyntax
, Core
, Err
, Export
, Generalize
, Imp
, ImpToLLVM
, IncState
, Inference
, Inline
, IRVariants
, JAX.Concrete
, JAX.Rename
, JAX.ToSimp
, LLVM.Link
, LLVM.Compile
, LLVM.CUDA
, LLVM.Shims
, Lexing
, Linearize
, Lower
, MonadUtil
, MTL1
, Name
, Occurrence
, OccAnalysis
, Optimize
, PeepholeOptimize
, PPrint
, RawName
, Runtime
, RuntimePrint
, Serialize
, Simplify
, Subst
, SourceRename
, SourceIdTraversal
, TopLevel
, Transpose
, Types.Core
, Types.Imp
, Types.Primitives
, Types.OpNames
, Types.Source
, Types.Top
, QueryType
, QueryTypePure
, Util
, Vectorize
, Actor
, Live.Eval
, Live.Web
, RenderHtml
other-modules: Paths_dex
build-depends: base
, bytestring
, containers
, cryptonite
, exceptions
, hashable
, llvm-hs
, llvm-hs-pure
, mtl
, scientific
, transformers
, unordered-containers
, utf8-string
-- Parsing
, megaparsec
, parser-combinators
-- Text output
, prettyprinter
, text
-- Portable system utilities
, directory
, filepath
, haskeline
, process
, temporary
-- Serialization
, aeson
, store
, time
-- Floating-point pedanticness (correcting for GHC < 9.2.2)
, floating-bits
, binary
, blaze-html
, blaze-markup
, cmark
, http-types
, wai
, warp
if flag(debug)
cpp-options: -DDEX_DEBUG
default-language: Haskell2010
hs-source-dirs: src/lib
ghc-options: -Wall
-Wno-unticked-promoted-constructors
-fPIC
-optP-Wno-nonportable-include-path
cxx-sources: src/lib/dexrt.cpp
cxx-options: -std=c++11 -fPIC
-- Mimicking -XGHC2021 in GHC 8.10.1
default-extensions: BangPatterns
, BinaryLiterals
, ConstrainedClassMethods
, ConstraintKinds
, DeriveDataTypeable
, DeriveFoldable
, DeriveFunctor
, DeriveGeneric
, DeriveLift
, DeriveTraversable
, DoAndIfThenElse
, EmptyCase
, EmptyDataDecls
, EmptyDataDeriving
, ExistentialQuantification
, ExplicitForAll
-- FieldSelectors was introduced in GHC 9.2
, FlexibleContexts
, FlexibleInstances
, ForeignFunctionInterface
, GADTSyntax
, GeneralisedNewtypeDeriving
, HexFloatLiterals
, ImplicitPrelude
, ImportQualifiedPost
, InstanceSigs
, KindSignatures
, MonomorphismRestriction
, MultiParamTypeClasses
, NamedFieldPuns
, NamedWildCards
, NumericUnderscores
, PatternGuards
, PolyKinds
, PostfixOperators
, RankNTypes
, RelaxedPolyRec
, ScopedTypeVariables
, StandaloneDeriving
, StandaloneKindSignatures
, StarIsType
, TraditionalRecordSyntax
, TupleSections
, TypeApplications
, TypeOperators
, TypeSynonymInstances
-- Other extensions
, BlockArguments
, CPP
, DataKinds
, DefaultSignatures
, DerivingVia
, FunctionalDependencies
, GADTs
, LambdaCase
, OverloadedStrings
, PatternSynonyms
, QuantifiedConstraints
, RecordWildCards
, TypeFamilies
, ViewPatterns
pkgconfig-depends: libpng
if flag(cuda)
include-dirs: /usr/local/cuda/include
extra-libraries: cuda
cxx-options: -DDEX_CUDA
cpp-options: -DDEX_CUDA
if flag(optimized)
ghc-options: -O3
else
ghc-options: -O0
executable dex
main-is: dex.hs
build-depends: dex
, ansi-wl-pprint
, ansi-terminal
, base
, bytestring
, containers
, directory
, exceptions
, haskeline
, mtl
, optparse-applicative
, prettyprinter
, store
, text
, unix
default-language: Haskell2010
hs-source-dirs: src
ghc-options: -threaded
-optP-Wno-nonportable-include-path
-rtsopts
-Wall
"-with-rtsopts=-I0 -A16m"
default-extensions: CPP
, DeriveGeneric
, LambdaCase
, OverloadedStrings
, BlockArguments
if flag(cuda)
cpp-options: -DDEX_CUDA
if flag(optimized)
ghc-options: -O3
else
ghc-options: -O0
foreign-library Dex
if flag(foreign)
buildable: True
else
buildable: False
type: native-shared
other-modules: Dex.Foreign.API
, Dex.Foreign.Context
, Dex.Foreign.JAX
, Dex.Foreign.JIT
, Dex.Foreign.Serialize
, Dex.Foreign.Util
build-depends: dex
, aeson
, base
, bytestring
, containers
, llvm-hs
, mtl
, random
, text
hs-source-dirs: src/
c-sources: src/Dex/Foreign/rts.c
cc-options: -std=c11 -fPIC
ghc-options: -Wall
-fPIC
-optP-Wno-nonportable-include-path
-Wno-unticked-promoted-constructors
default-language: Haskell2010
default-extensions: BlockArguments
, DataKinds
, FlexibleInstances
, GADTs
, LambdaCase
, NamedFieldPuns
, OverloadedStrings
, RecordWildCards
, ScopedTypeVariables
, ImportQualifiedPost
, TypeApplications
if flag(optimized)
ghc-options: -O3
else
ghc-options: -O0
test-suite spec
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: tests/unit
ghc-options: -Wall
-Wno-unticked-promoted-constructors
build-depends: base
, containers
, hspec
, mtl
, QuickCheck
, text
, aeson
, aeson-pretty
, bytestring
, blaze-html
, dex
other-modules: ConstantCastingSpec
, JaxADTSpec
, OccAnalysisSpec
, OccurrenceSpec
, RawNameSpec
, SourceInfoSpec
default-language: Haskell2010
build-tool-depends: hspec-discover:hspec-discover
-- Mimicking -XGHC2021 in GHC 8.10.1
default-extensions: BangPatterns
, BinaryLiterals
, ConstrainedClassMethods
, ConstraintKinds
, DeriveDataTypeable
, DeriveFoldable
, DeriveFunctor
, DeriveGeneric
, DeriveLift
, DeriveTraversable
, DoAndIfThenElse
, EmptyCase
, EmptyDataDecls
, EmptyDataDeriving
, ExistentialQuantification
, ExplicitForAll
-- FieldSelectors was introduced in GHC 9.2
, FlexibleContexts
, FlexibleInstances
, ForeignFunctionInterface
, GADTSyntax
, GeneralisedNewtypeDeriving
, HexFloatLiterals
, ImplicitPrelude
, ImportQualifiedPost
, InstanceSigs
, KindSignatures
, MonomorphismRestriction
, MultiParamTypeClasses
, NamedFieldPuns
, NamedWildCards
, NumericUnderscores
, PatternGuards
, PolyKinds
, PostfixOperators
, RankNTypes
, RelaxedPolyRec
, ScopedTypeVariables
, StandaloneDeriving
, StandaloneKindSignatures
, StarIsType
, TraditionalRecordSyntax
, TupleSections
, TypeApplications
, TypeOperators
, TypeSynonymInstances
-- Other extensions
, BlockArguments
, CPP
, DataKinds
, DefaultSignatures
, DerivingVia
, FunctionalDependencies
, GADTs
, LambdaCase
, OverloadedStrings
, PatternSynonyms
, QuantifiedConstraints
, RecordWildCards
, TypeFamilies
, ViewPatterns