forked from turion/rhine-koans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rhine-koans.cabal
503 lines (416 loc) · 15.5 KB
/
rhine-koans.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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
cabal-version: 3.4
name: rhine-koans
version: 0.1.0.0
-- synopsis:
-- description:
license: MIT
license-file: LICENSE
author: Manuel Bärenz
maintainer: [email protected]
-- copyright:
build-type: Simple
extra-doc-files: CHANGELOG.md
-- extra-source-files:
tested-with:
GHC == 9.2.8
GHC == 9.4.8
GHC == 9.6.4
GHC == 9.8.2
common opts
ghc-options: -Wall
default-language: GHC2021
build-depends: base >=4.16.4.0 && <4.20
, rhine ^>= 1.4
, text ^>= 2.0
, transformers ^>= 0.6
default-extensions:
DataKinds
GADTs
LambdaCase
OverloadedStrings
if flag(dev)
ghc-options: -Werror
common exec
import: opts
other-modules: Koan
hs-source-dirs: generic/reimport-main
common test
import: exec
build-depends:
, rhine-koans:test-io
flag dev
description: Enable warnings as errors. Active on ci.
default: False
manual: True
flag solution
description: Compile the solutions
default: False
manual: True
library test-io
import: opts
hs-source-dirs: generic/test-io
exposed-modules: TestIO
build-depends:
silently ^>= 1.2
, temporary ^>= 1.3
library test-gloss
import: opts
hs-source-dirs: generic/test-gloss
exposed-modules: TestGloss
build-depends:
rhine-gloss,
monad-schedule ^>= 0.2
common basic-1-1-hello-rhine
if flag(solution)
hs-source-dirs: koans/basic/1/1-hello-rhine/solution
else
hs-source-dirs: koans/basic/1/1-hello-rhine
executable basic-1-1-hello-rhine
import: exec, basic-1-1-hello-rhine
main-is: Main.hs
test-suite basic-1-1-hello-rhine-test
import: test, basic-1-1-hello-rhine
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/1-hello-rhine/test
common basic-1-2-fix-the-bug
if flag(solution)
hs-source-dirs: koans/basic/1/2-fix-the-bug/solution
else
hs-source-dirs: koans/basic/1/2-fix-the-bug
executable basic-1-2-fix-the-bug
import: exec, basic-1-2-fix-the-bug
main-is: Main.hs
test-suite basic-1-2-fix-the-bug-test
import: test, basic-1-2-fix-the-bug
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/2-fix-the-bug/test
common basic-1-3-faster
if flag(solution)
hs-source-dirs: koans/basic/1/3-faster/solution
else
hs-source-dirs: koans/basic/1/3-faster
executable basic-1-3-faster
import: exec, basic-1-3-faster
main-is: Main.hs
test-suite basic-1-3-faster-test
import: test, basic-1-3-faster
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/3-faster/test
common basic-1-4-compose
if flag(solution)
hs-source-dirs: koans/basic/1/4-compose/solution
else
hs-source-dirs: koans/basic/1/4-compose
executable basic-1-4-compose
import: exec, basic-1-4-compose
main-is: Main.hs
test-suite basic-1-4-compose-test
import: test, basic-1-4-compose
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/4-compose/test
common basic-1-5-compose-more
if flag(solution)
hs-source-dirs: koans/basic/1/5-compose-more/solution
else
hs-source-dirs: koans/basic/1/5-compose-more
executable basic-1-5-compose-more
import: exec, basic-1-5-compose-more
main-is: Main.hs
test-suite basic-1-5-compose-more-test
import: test, basic-1-5-compose-more
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/5-compose-more/test
common basic-1-6-compose-signal-functions-and-clocks
if flag(solution)
hs-source-dirs: koans/basic/1/6-compose-signal-functions-and-clocks/solution
else
hs-source-dirs: koans/basic/1/6-compose-signal-functions-and-clocks
executable basic-1-6-compose-signal-functions-and-clocks
import: exec, basic-1-6-compose-signal-functions-and-clocks
main-is: Main.hs
test-suite basic-1-6-compose-signal-functions-and-clocks-test
import: test, basic-1-6-compose-signal-functions-and-clocks
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/6-compose-signal-functions-and-clocks/test
common basic-1-7-compose-on-the-same-clock
if flag(solution)
hs-source-dirs: koans/basic/1/7-compose-on-the-same-clock/solution
else
hs-source-dirs: koans/basic/1/7-compose-on-the-same-clock
executable basic-1-7-compose-on-the-same-clock
import: exec, basic-1-7-compose-on-the-same-clock
main-is: Main.hs
test-suite basic-1-7-compose-on-the-same-clock-test
import: test, basic-1-7-compose-on-the-same-clock
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/7-compose-on-the-same-clock/test
common basic-1-8-compose-on-different-clocks
if flag(solution)
hs-source-dirs: koans/basic/1/8-compose-on-different-clocks/solution
else
hs-source-dirs: koans/basic/1/8-compose-on-different-clocks
executable basic-1-8-compose-on-different-clocks
import: exec, basic-1-8-compose-on-different-clocks
main-is: Main.hs
test-suite basic-1-8-compose-on-different-clocks-test
import: test, basic-1-8-compose-on-different-clocks
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/1/8-compose-on-different-clocks/test
common basic-2-1-input
if flag(solution)
hs-source-dirs: koans/basic/2/1-input/solution
else
hs-source-dirs: koans/basic/2/1-input
executable basic-2-1-input
import: exec, basic-2-1-input
main-is: Main.hs
test-suite basic-2-1-input-test
import: test, basic-2-1-input
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/1-input/test
common basic-2-2-count-the-words
if flag(solution)
hs-source-dirs: koans/basic/2/2-count-the-words/solution
else
hs-source-dirs: koans/basic/2/2-count-the-words
executable basic-2-2-count-the-words
import: exec, basic-2-2-count-the-words
main-is: Main.hs
test-suite basic-2-2-count-the-words-test
import: test, basic-2-2-count-the-words
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/2-count-the-words/test
common basic-2-3-count-the-lines
if flag(solution)
hs-source-dirs: koans/basic/2/3-count-the-lines/solution
else
hs-source-dirs: koans/basic/2/3-count-the-lines
executable basic-2-3-count-the-lines
import: exec, basic-2-3-count-the-lines
main-is: Main.hs
test-suite basic-2-3-count-the-lines-test
import: test, basic-2-3-count-the-lines
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/3-count-the-lines/test
common basic-2-4-count-all-the-words
if flag(solution)
hs-source-dirs: koans/basic/2/4-count-all-the-words/solution
else
hs-source-dirs: koans/basic/2/4-count-all-the-words
executable basic-2-4-count-all-the-words
import: exec, basic-2-4-count-all-the-words
main-is: Main.hs
test-suite basic-2-4-count-all-the-words-test
import: test, basic-2-4-count-all-the-words
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/4-count-all-the-words/test
common basic-2-5-count-all-the-chars
if flag(solution)
hs-source-dirs: koans/basic/2/5-count-all-the-chars/solution
else
hs-source-dirs: koans/basic/2/5-count-all-the-chars
executable basic-2-5-count-all-the-chars
import: exec, basic-2-5-count-all-the-chars
main-is: Main.hs
test-suite basic-2-5-count-all-the-chars-test
import: test, basic-2-5-count-all-the-chars
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/5-count-all-the-chars/test
common basic-2-6-count-everything
if flag(solution)
hs-source-dirs: koans/basic/2/6-count-everything/solution
else
hs-source-dirs: koans/basic/2/6-count-everything
executable basic-2-6-count-everything
import: exec, basic-2-6-count-everything
main-is: Main.hs
test-suite basic-2-6-count-everything-test
import: test, basic-2-6-count-everything
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/6-count-everything/test
common basic-2-7-count-everything-nicer
if flag(solution)
hs-source-dirs: koans/basic/2/7-count-everything-nicer/solution
else
hs-source-dirs: koans/basic/2/7-count-everything-nicer
executable basic-2-7-count-everything-nicer
import: exec, basic-2-7-count-everything-nicer
main-is: Main.hs
test-suite basic-2-7-count-everything-nicer-test
import: test, basic-2-7-count-everything-nicer
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/7-count-everything-nicer/test
common basic-2-8-dont-count-everything
if flag(solution)
hs-source-dirs: koans/basic/2/8-dont-count-everything/solution
else
hs-source-dirs: koans/basic/2/8-dont-count-everything
executable basic-2-8-dont-count-everything
import: exec, basic-2-8-dont-count-everything
main-is: Main.hs
test-suite basic-2-8-dont-count-everything-test
import: test, basic-2-8-dont-count-everything
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/8-dont-count-everything/test
common basic-2-9-modularize
if flag(solution)
hs-source-dirs: koans/basic/2/9-modularize/solution
else
hs-source-dirs: koans/basic/2/9-modularize
executable basic-2-9-modularize
import: exec, basic-2-9-modularize
main-is: Main.hs
test-suite basic-2-9-modularize-test
import: test, basic-2-9-modularize
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/2/9-modularize/test
common basic-3-1-exceptions
if flag(solution)
hs-source-dirs: koans/basic/3/1-exceptions/solution
else
hs-source-dirs: koans/basic/3/1-exceptions
executable basic-3-1-exceptions
import: exec, basic-3-1-exceptions
main-is: Main.hs
test-suite basic-3-1-exceptions-test
import: test, basic-3-1-exceptions
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/3/1-exceptions/test
common basic-3-2-state
if flag(solution)
hs-source-dirs: koans/basic/3/2-state/solution
else
hs-source-dirs: koans/basic/3/2-state
executable basic-3-2-state
import: exec, basic-3-2-state
main-is: Main.hs
test-suite basic-3-2-state-test
import: test, basic-3-2-state
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/3/2-state/test
common basic-3-3-asynchronize
if flag(solution)
hs-source-dirs: koans/basic/3/3-asynchronize/solution
else
hs-source-dirs: koans/basic/3/3-asynchronize
executable basic-3-3-asynchronize
import: exec, basic-3-3-asynchronize
main-is: Main.hs
test-suite basic-3-3-asynchronize-test
import: test, basic-3-3-asynchronize
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/basic/3/3-asynchronize/test
common gloss
build-depends:
gloss,
rhine-gloss,
transformers ^>= 0.6,
random ^>= 1.2,
MonadRandom ^>= 0.6,
containers ^>= 0.6,
monad-schedule ^>= 0.2,
rhine-koans:test-gloss
common ui-1-gloss-1-circle
import: gloss
if flag(solution)
hs-source-dirs: koans/ui/1-gloss/1-circle/solution
else
hs-source-dirs: koans/ui/1-gloss/1-circle
executable ui-1-gloss-1-circle
import: exec, ui-1-gloss-1-circle
main-is: Main.hs
test-suite ui-1-gloss-1-circle-test
import: test, ui-1-gloss-1-circle
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/ui/1-gloss/1-circle/test
common ui-1-gloss-2-move
import: gloss
if flag(solution)
hs-source-dirs: koans/ui/1-gloss/2-move/solution
else
hs-source-dirs: koans/ui/1-gloss/2-move
executable ui-1-gloss-2-move
import: exec, ui-1-gloss-2-move
main-is: Main.hs
test-suite ui-1-gloss-2-move-test
import: test, ui-1-gloss-2-move
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/ui/1-gloss/2-move/test
common ui-1-gloss-3-modularize
import: gloss
if flag(solution)
hs-source-dirs: koans/ui/1-gloss/3-modularize/solution
else
hs-source-dirs: koans/ui/1-gloss/3-modularize
executable ui-1-gloss-3-modularize
import: exec, ui-1-gloss-3-modularize
main-is: Main.hs
test-suite ui-1-gloss-3-modularize-test
import: test, ui-1-gloss-3-modularize
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/ui/1-gloss/3-modularize/test
common ui-1-gloss-4-user-input
import: gloss
if flag(solution)
hs-source-dirs: koans/ui/1-gloss/4-user-input/solution
else
hs-source-dirs: koans/ui/1-gloss/4-user-input
executable ui-1-gloss-4-user-input
import: exec, ui-1-gloss-4-user-input
main-is: Main.hs
test-suite ui-1-gloss-4-user-input-test
import: test, ui-1-gloss-4-user-input
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/ui/1-gloss/4-user-input/test
common ui-1-gloss-5-randomness
import: gloss
if flag(solution)
hs-source-dirs: koans/ui/1-gloss/5-randomness/solution
else
hs-source-dirs: koans/ui/1-gloss/5-randomness
executable ui-1-gloss-5-randomness
import: exec, ui-1-gloss-5-randomness
main-is: Main.hs
test-suite ui-1-gloss-5-randomness-test
import: test, ui-1-gloss-5-randomness
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/ui/1-gloss/5-randomness/test
common ui-1-gloss-6-control-flow
import: gloss
if flag(solution)
hs-source-dirs: koans/ui/1-gloss/6-control-flow/solution
else
hs-source-dirs: koans/ui/1-gloss/6-control-flow
executable ui-1-gloss-6-control-flow
import: exec, ui-1-gloss-6-control-flow
main-is: Main.hs
test-suite ui-1-gloss-6-control-flow-test
import: test, ui-1-gloss-6-control-flow
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: koans/ui/1-gloss/6-control-flow/test