-
Notifications
You must be signed in to change notification settings - Fork 70
/
coalton.asd
268 lines (255 loc) · 10.4 KB
/
coalton.asd
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
;;; This is coalton.asd, the toplevel coalton system definition.
;;;
;;; While it would be more convenient to put all of Coalton's
;;; dependencies into a single file, the need to define an ASDF
;;; extension for Coalton source files prevents that. Specifically,
;;; coalton/library's system definition contains a
;;; :defsystem-depends-on clause, and though it would be nice to to be
;;; able call that dependency 'coalton/asdf', ASDF signals a
;;; circular dependency error, claiming that it depends on 'coalton'.
;;;
;;; The asdf extension in turn requires access to the compiler. so
;;; coalton-asdf and coalton-compiler live in their own .asd files.
(asdf:defsystem #:coalton
:description "An efficient, statically typed functional programming language that supercharges Common Lisp. "
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:in-order-to ((asdf:test-op (asdf:test-op #:coalton/tests)))
:depends-on (#:coalton-compiler
#:coalton/library))
(asdf:defsystem #:coalton/library
:description "The Coalton standard library."
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:around-compile (lambda (compile)
(let (#+sbcl (sb-ext:*derive-function-types* t)
#+sbcl (sb-ext:*block-compile-default* :specified)
;; The lisp-toplevel form is currently
;; restricted to standard library
;; implementation by checking for the
;; presence of this feature.
(*features* (cons ':coalton-lisp-toplevel *features*)))
(funcall compile)))
:defsystem-depends-on (#:coalton-asdf)
:depends-on (#:coalton-compiler
#:coalton/hashtable-shim
#:trivial-garbage
#:alexandria)
:pathname "library/"
:serial t
:components ((:file "set-float-traps")
(:file "utils")
(:file "types")
(:file "primitive-types")
(:file "classes")
(:file "hash")
(:file "builtin")
(:file "functions")
(:file "boolean")
(:file "bits")
(:module "math"
:serial t
:components ((:file "arith")
(:file "num")
(:file "bounded")
(:file "conversions")
(:file "fraction")
(:file "integral")
(:file "real")
(:file "complex")
(:file "elementary")
(:file "dyadic")
(:file "dual")
(:file "package")))
(:file "randomaccess")
(:file "cell")
(:file "tuple")
(:file "iterator")
(:file "optional")
(:file "result")
(:file "lisparray")
(:file "list")
(:file "vector")
(:file "char")
(:file "string")
(:file "slice")
(:file "hashtable")
(:file "queue")
(:file "monad/state")
(:file "ord-tree")
(:file "ord-map")
(:file "monad/free")
(:file "seq")
(:file "system")
(:file "file")
(:file "prelude")))
(cl:when (cl:member (uiop:getenv "COALTON_PORTABLE_BIGFLOAT") '("1" "true" "t") :test #'cl:equalp)
(cl:pushnew ':coalton-portable-bigfloat cl:*features*))
(asdf:defsystem #:coalton/library/big-float
:description "An arbitrary precision floating point library."
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:around-compile (lambda (compile)
(let (#+sbcl (sb-ext:*derive-function-types* t)
#+sbcl (sb-ext:*block-compile-default* :specified))
(funcall compile)))
:depends-on (#:coalton
#:coalton/library
(:feature (:and (:not :coalton-portable-bigfloat) :sbcl) #:sb-mpfr)
(:feature (:and (:not :coalton-portable-bigfloat) :sbcl) #:sb-gmp))
:pathname "library/big-float/"
:serial t
:components ((:file "package")
(:file "impl-sbcl"
:if-feature (:and (:not :coalton-portable-bigfloat) :sbcl))
(:file "impl-default"
:if-feature (:or :coalton-portable-bigfloat (:not :sbcl)))))
(asdf:defsystem #:coalton/library/computable-reals
:description "A Coalton interface for computable-reals (https://github.com/stylewarning/computable-reals)"
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:pathname "library/computable-reals"
:depends-on (#:coalton
#:computable-reals)
:serial t
:components ((:file "computable-reals")))
(asdf:defsystem #:coalton/testing
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:depends-on (#:coalton
#:fiasco)
:pathname "src/testing/"
:serial t
:components ((:file "package")
(:file "coalton-native-test-utils")))
(asdf:defsystem #:coalton/benchmarks
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:around-compile (lambda (compile)
(let (#+sbcl (sb-ext:*derive-function-types* t)
#+sbcl (sb-ext:*block-compile-default* :specified))
(funcall compile)))
:depends-on (#:coalton
#:coalton/library/big-float
#:trivial-benchmark
#:yason)
:pathname "benchmarks"
:serial t
:components ((:file "package")
(:file "fibonacci")
(:file "big-float")
(:module "gabriel-benchmarks"
:serial t
:components ((:file "tak")
(:file "stak")
(:file "takl")
(:file "takr")))))
;;; we need to inspect the sbcl version in order to decide which version of the hashtable shim to load,
;;; because 2.1.12 includes (or will include) a bugfix that allows a cleaner, more maintainable
;;; implementation.
#+sbcl
(cl:handler-case
(cl:progn
(sb-ext:assert-version->= 2 2 2)
(cl:pushnew ':sbcl-post-2-2-2 cl:*features*))
(cl:error (c)
(declare (ignore c))
(cl:pushnew ':sbcl-pre-2-2-2 cl:*features*)))
(asdf:defsystem #:coalton/hashtable-shim
:description "Shim over Common Lisp hash tables with custom hash functions, for use by the Coalton standard library."
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:pathname "src/hashtable-shim"
:serial t
:components ((:file "defs")
(:file "impl-sbcl" :if-feature :sbcl)
(:file "hash-table" :if-feature (:not :sbcl))
(:file "impl-custom" :if-feature (:not :sbcl))))
(asdf:defsystem #:coalton/doc
:description "Documentation generator for Coalton"
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:version (:read-file-form "VERSION.txt")
:depends-on (#:coalton
#:coalton/library/big-float
#:coalton/library/computable-reals
#:html-entities
#:yason
#:uiop)
:around-compile (lambda (compile)
(let (#+sbcl (sb-ext:*derive-function-types* t))
(funcall compile)))
:pathname "src/doc"
:serial t
:components ((:file "base")
(:file "environment")
(:file "model")
(:file "string")
(:file "markdown")
(:file "hugo")
(:file "main")))
(asdf:defsystem #:coalton/tests
:description "Tests for COALTON."
:author "Coalton contributors (https://github.com/coalton-lang/coalton)"
:license "MIT"
:depends-on (#:coalton
#:coalton/library/big-float
#:coalton/testing
#:fiasco
#:quil-coalton/tests
#:thih-coalton/tests)
:perform (asdf:test-op (o s)
(unless (symbol-call :coalton-tests :run-coalton-tests)
(error "Tests failed")))
:pathname "tests/"
:serial t
:components ((:file "package")
(:file "loader")
(:file "utilities")
(:file "source-tests")
(:file "tarjan-scc-tests")
(:file "reader-tests")
(:file "error-tests")
(:module "parser"
:serial t
:components ((:file "cursor-tests")))
(:file "entry-tests")
(:file "toplevel-tests")
(:file "type-inference-tests")
(:file "fundep-tests")
(:file "fundep-fib-test")
(:file "runtime-tests")
(:module "typechecker"
:serial t
:components ((:file "map-tests")
(:file "lisp-type-tests")))
(:file "environment-persist-tests")
(:file "coalton-tests")
(:file "slice-tests")
(:file "float-tests")
(:file "dual-tests")
(:file "quantize-tests")
(:file "hashtable-tests")
(:file "iterator-tests")
(:file "call-coalton-from-lisp")
(:file "vector-tests")
(:file "string-tests")
(:file "recursive-let-tests")
(:file "class-tests")
(:file "struct-tests")
(:file "list-tests")
(:file "lisparray-tests")
(:file "red-black-tests")
(:file "seq-tests")
(:file "pattern-matching-tests")
(:file "looping-native-tests")
(:file "monomorphizer-tests")
(:file "inliner-tests")
(:file "file-tests")))