-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathparconc-examples.cabal
666 lines (544 loc) · 14.9 KB
/
parconc-examples.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
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
cabal-version: 2.2
name: parconc-examples
version: 0.4.8
synopsis: Examples to accompany the book "Parallel and Concurrent Programming in Haskell"
description: Examples to accompany the book "Parallel and Concurrent Programming in Haskell"
license: BSD-3-Clause
license-file: LICENSE
author: Simon Marlow
maintainer: Simon Marlow <[email protected]>
copyright: (c) Simon Marlow 2011-2013
category: Sample Code
build-type: Simple
bug-reports: https://github.com/simonmar/parconc-examples/issues
homepage: http://github.com/simonmar/parconc-examples
extra-source-files: sudoku17.1000.txt
sudoku17.16000.txt
sudoku17.49151.txt
chanbench.hs
findpar5.hs
parlist.hs
other/correcter.hs
other/arithgame.hs
other/game.hs
other/README
distrib-db/WorkerSample.hs
distrib-db/DatabaseSample.hs
sudoku-par1.hs
sudoku-par2.hs
sudoku-par3.hs
sudoku-par4.hs
kmeans/Makefile
timeout2.hs
parinfer/benchmark.in
tmvar.hs
windowman.hs
ChangeLog.md
README.md
source-repository head
type: git
location: https://github.com/simonmar/parconc-examples.git
-- -----------------------------------------------------------------------------
-- Flags
-- -f llvm: enable -fllvm to GHC; requires LLVM to be installed, but
-- makes the Repa programs faster
flag llvm
default: False
-- -f devil: Enable the image-maniputation programs, which are
-- disabled by default because they require the devil library which
-- needs to be installed separately.
flag devil
default: False
-- -f cuda: Build the examples that require accelerate-cuda. These
-- need the NVidia CUDA tools installed.
flag cuda
default: False
-- -f-accelerate: Do not build the examples that require accelerate.
flag accelerate
default : True
-- -f-distributed: Do not build the examples that require distributed-process.
flag distributed
default : True
-- -f network26: Use network-2.6. Internal flag; you shouldn't need
-- to change this.
flag network26
default : True
common deps
default-language: Haskell2010
build-depends:
array >= 0.4 && <0.6,
async >= 2.0 && < 2.3,
base >= 4.5 && < 4.15,
binary >=0.6.3 && < 0.11,
bytestring >= 0.9 && < 0.12,
containers >= 0.4 && < 0.6,
deepseq >= 1.3 && < 1.5,
directory >= 1.1 && < 1.4,
filepath >= 1.3 && < 1.5,
monad-par >= 0.3.4 && < 0.4,
-- monad-par 0.3 has a bug:
-- https://github.com/simonmar/monad-par/issues/23
parallel ==3.2.*,
random >= 1.0 && < 1.3,
stm >=2.4 && < 2.6,
time >= 1.4 && < 1.12,
template-haskell >= 2.7 && < 2.17,
transformers >=0.3 && <0.6,
utf8-string >= 0.3 && < 1.1,
vector >= 0.10 && < 0.13,
xml ==1.3.*,
common network
if flag(network26)
build-depends: network >= 2.6 && < 2.9
, network-uri >= 2.6 && < 2.7
else
build-depends: network >= 2.3 && < 2.6
common http
build-depends:
http-conduit >= 2.1 && < 2.4
common monad-par
build-depends:
abstract-par ==0.3.*,
monad-par >= 0.3.4 && < 0.4
common distributed
if flag(distributed)
build-depends:
distributed-process >= 0.5 && < 0.8
, distributed-process-simplelocalnet ==0.2.*
, distributed-static >= 0.2 && < 0.4
else
buildable: False
if impl(ghc <= 7.6)
-- prior to ghc-7.4 generics lived in ghc-prim
build-depends: ghc-prim
-- -----------------------------------------------------------------------------
-- par-eval
executable rpar
import: deps
main-is: rpar.hs
ghc-options: -threaded
executable sudoku1
import: deps
main-is: sudoku1.hs
other-modules: Sudoku
executable sudoku2
import: deps
main-is: sudoku2.hs
other-modules: Sudoku
ghc-options: -threaded
executable sudoku3
import: deps
main-is: sudoku3.hs
other-modules: Sudoku
ghc-options: -threaded
executable sudoku4
import: deps
main-is: sudoku4.hs
other-modules: Sudoku
ghc-options: -threaded
executable sudoku5
import: deps
main-is: sudoku5.hs
other-modules: Sudoku
ghc-options: -threaded
-- -----------------------------------------------------------------------------
-- par-strat
executable strat
import: deps
main-is: strat.hs
ghc-options: -threaded
executable strat2
import: deps
main-is: strat2.hs
ghc-options: -threaded
executable strat3
import: deps
main-is: strat3.hs
ghc-options: -threaded
executable rsa
import: deps
main-is: rsa.hs
other-modules: ByteStringCompat
executable rsa1
import: deps
main-is: rsa1.hs
other-modules: ByteStringCompat
ghc-options: -threaded
executable rsa2
import: deps
main-is: rsa2.hs
other-modules: ByteStringCompat
ghc-options: -threaded
executable kmeans
import: deps
hs-source-dirs: kmeans
main-is: kmeans.hs
other-modules: KMeansCore
ghc-options: -threaded
executable GenSamples
import: deps
hs-source-dirs: kmeans
main-is: GenSamples.hs
other-modules: KMeansCore
build-depends: normaldistribution >= 1.1 && < 1.2
-- -----------------------------------------------------------------------------
-- par-monad
executable parmonad
import: deps
main-is: parmonad.hs
ghc-options: -threaded
executable rsa-pipeline
import: deps
main-is: rsa-pipeline.hs
other-modules: ByteStringCompat Stream
ghc-options: -threaded
executable fwsparse
import: deps
main-is: fwsparse.hs
other-modules: SparseGraph MapCompat
hs-source-dirs: fwsparse
executable fwsparse1
import: deps
main-is: fwsparse1.hs
other-modules: SparseGraph MapCompat
hs-source-dirs: fwsparse
ghc-options: -threaded
executable timetable
import: deps
main-is: timetable.hs
executable timetable1
import: deps
main-is: timetable1.hs
executable timetable2
import: deps
main-is: timetable2.hs
executable timetable3
import: deps
main-is: timetable3.hs
executable parinfer
import: deps
main-is: parinfer.hs
hs-source-dirs: parinfer
ghc-options: -threaded
other-modules: InferMonad
Term
FiniteMap
Shows
Environment
Lex
MaybeM
Parse
MyList
Type
Infer
Substitution
StateX
build-tool-depends: alex:alex, happy:happy
-- -----------------------------------------------------------------------------
-- par-repa
executable fwdense
import: deps
main-is: fwdense.hs
build-depends:
repa >= 3.2 && < 3.5
ghc-options: -O2
if flag(llvm)
ghc-options: -fllvm
executable fwdense1
import: deps
main-is: fwdense1.hs
build-depends:
repa >= 3.2 && < 3.5
ghc-options: -O2 -threaded
if flag(llvm)
ghc-options: -fllvm
executable rotateimage
import: deps
main-is: rotateimage.hs
build-depends:
repa >= 3.2 && < 3.5
ghc-options: -O2 -threaded
if flag(devil)
build-depends: repa-devil == 0.3.*
else
buildable: False
if flag(llvm)
ghc-options: -fllvm
-- -----------------------------------------------------------------------------
-- par-accel
executable fwaccel
import: deps
main-is: fwaccel.hs
other-modules: AccelerateCompat
ghc-options: -O2
if flag(accelerate)
build-depends: accelerate >= 0.12 && < 1.3
else
buildable: False
executable fwaccel-gpu
import: deps
main-is: fwaccel-gpu.hs
if flag(accelerate)
build-depends: accelerate >= 0.12 && < 1.3
else
buildable: False
if flag(cuda)
build-depends: accelerate-cuda >= 0.12 && < 0.15
else
buildable: False
ghc-options: -O2
executable mandel
import: deps
main-is: mandel.hs
other-modules: Config
hs-source-dirs: mandel
build-depends: fclabels
if flag(accelerate)
build-depends: accelerate >= 0.12 && < 1.3
, accelerate-io
else
buildable: False
if flag(cuda)
build-depends: accelerate-cuda >= 0.12 && < 0.15
else
buildable: False
ghc-options: -O2
-- -----------------------------------------------------------------------------
-- conc-fork
executable fork
import: deps
main-is: fork.hs
executable reminders
import: deps
main-is: reminders.hs
executable reminders2
import: deps
main-is: reminders2.hs
-- -----------------------------------------------------------------------------
-- conc-mvar
executable mvar1
import: deps
main-is: mvar1.hs
executable mvar2
import: deps
main-is: mvar2.hs
executable mvar3
import: deps
main-is: mvar3.hs
executable logger
import: deps
main-is: logger.hs
executable phonebook
import: deps
main-is: phonebook.hs
executable chan
import: deps
main-is: chan.hs
executable chan2
import: deps
main-is: chan2.hs
-- -----------------------------------------------------------------------------
-- conc-overlap
executable geturls1
import: deps, network, http
main-is: geturls1.hs
other-modules: GetURL
executable geturls2
import: deps, network, http
main-is: geturls2.hs
other-modules: GetURL
executable geturls3
import: deps, network, http
main-is: geturls3.hs
other-modules: TimeIt GetURL
executable geturls4
import: deps, network, http
main-is: geturls4.hs
other-modules: GetURL
executable geturls5
import: deps, network, http
main-is: geturls5.hs
other-modules: GetURL
executable geturls6
import: deps, network, http
main-is: geturls6.hs
other-modules: TimeIt GetURL
-- -----------------------------------------------------------------------------
-- conc-asyncex
executable geturlscancel
import: deps, network, http
main-is: geturlscancel.hs
other-modules: TimeIt GetURL
executable geturlscancel2
import: deps, network, http
main-is: geturlscancel2.hs
other-modules: TimeIt GetURL
executable modifytwo
import: deps
main-is: modifytwo.hs
executable chan3
import: deps
main-is: chan3.hs
executable timeout
import: deps
main-is: timeout.hs
executable catch-mask
import: deps
main-is: catch-mask.hs
executable catch-mask2
import: deps
main-is: catch-mask2.hs
-- -----------------------------------------------------------------------------
-- conc-stm
-- NB. The book refers to "tmvar.hs" and "windowmanager.hs", so we
-- can't change rename these files. However, we need to use proper
-- upper-case module names, so we use symbolic links from a
-- subdirectory (mismodules) so that the repo remains safe to use on
-- case-insensitive filesystems (#15).
executable miscmodules
import: deps
main-is: miscmodules.hs
hs-source-dirs: miscmodules .
other-modules: TMVar, TList, TQueue, TBQueue, WindowManager
executable geturlsfirst
import: deps, network, http
main-is: geturlsfirst.hs
other-modules: ConcurrentUtils, GetURL
executable TChan
import: deps
main-is: TChan.hs
-- -----------------------------------------------------------------------------
-- conc-higher
executable geturls7
import: deps, network, http
main-is: geturls7.hs
other-modules: ConcurrentUtils, GetURL
executable geturls8
import: deps, network, http
main-is: geturls8.hs
other-modules: Async, GetURL
executable geturls9
import: deps, network, http
main-is: geturls9.hs
other-modules: Async, GetURL
executable timeout2
import: deps
main-is: timeout.hs
-- -----------------------------------------------------------------------------
-- conc-par
executable findseq
import: deps
main-is: findseq.hs
executable findpar
import: deps
main-is: findpar.hs
ghc-options: -threaded
executable findpar2
import: deps
main-is: findpar2.hs
ghc-options: -threaded
executable findpar3
import: deps
main-is: findpar3.hs
other-modules: CasIORef
ghc-options: -threaded
executable findpar4
import: deps, monad-par
main-is: findpar4.hs
ghc-options: -threaded
executable findpar5
import: deps, monad-par
main-is: findpar5.hs
ghc-options: -threaded
-- -----------------------------------------------------------------------------
-- conc-server
executable server
import: deps, network
main-is: server.hs
other-modules: ConcurrentUtils
executable server2
import: deps, network
main-is: server2.hs
other-modules: ConcurrentUtils
executable chat
import: deps, network
main-is: chat.hs
other-modules: ConcurrentUtils
-- -----------------------------------------------------------------------------
-- conc-distrib
executable ping
import: deps, network, distributed
main-is: distrib-ping/ping.hs
other-modules: DistribUtils
executable ping-multi
import: deps, network, distributed
main-is: distrib-ping/ping-multi.hs
other-modules: DistribUtils
executable ping-tc
import: deps, network, distributed
main-is: distrib-ping/ping-tc.hs
other-modules: DistribUtils
executable ping-tc-merge
import: deps, network, distributed
main-is: distrib-ping/ping-tc-merge.hs
other-modules: DistribUtils
-- extra, not in the text?
executable ping-tc-notify
import: deps, network, distributed
main-is: distrib-ping/ping-tc-notify.hs
other-modules: DistribUtils
executable ping-fail
import: deps, network, distributed
main-is: distrib-ping/ping-fail.hs
other-modules: DistribUtils
executable distrib-chat
import: deps, network, distributed
main-is: distrib-chat/chat.hs
other-modules: ConcurrentUtils DistribUtils
executable distrib-chat-noslave
import: deps, network, distributed
main-is: distrib-chat/chat-noslave.hs
other-modules: ConcurrentUtils
executable distrib-db
import: deps, network, distributed
main-is: db.hs
hs-source-dirs: . distrib-db
other-modules: DistribUtils Database
-- -----------------------------------------------------------------------------
-- conc-debugging-tuning
executable mvar4
import: deps
main-is: mvar4.hs
executable deadlock1
import: deps
main-is: deadlock1.hs
executable deadlock2
import: deps
main-is: deadlock2.hs
executable threadperf1
import: deps
main-is: threadperf1.hs
executable threadperf2
import: deps
main-is: threadperf2.hs
ghc-options: -rtsopts
-- -----------------------------------------------------------------------------
-- Extras (exercises etc.)
executable bingtranslator
import: deps, network, http
main-is: bingtranslator.hs
other-modules: BingTranslate GetURL
hs-source-dirs: other .
executable bingtranslatorconc
import: deps, network, http
main-is: bingtranslatorconc.hs
other-modules: BingTranslate GetURL
hs-source-dirs: other .
executable geturlsstm
import: deps, network, http
main-is: geturlsstm.hs
other-modules: TimeIt GetURL
-- ToDo:
-- euler35
-- index
-- sudoku-par{1,2,3,4,5}