-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.rkt
51 lines (48 loc) · 1.38 KB
/
main.rkt
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
#lang racket
(provide
(contract-out
;; data
[signal? predicate/c ]
[pure-signal? predicate/c]
[value-signal? predicate/c]
[reactor? predicate/c]
[tree? predicate/c]
[struct branch ([values list?] [children (listof tree?)]) #:omit-constructor]
[struct leaf ([values list?]) #:omit-constructor]
[reactor-done? (-> (and/c reactor? reactor-safe?) any/c)]
[reactor-suspended? (-> (and/c reactor? reactor-safe?) any/c)]
[last (-> value-signal? any)]
[last? (-> signal? any/c)]
[default (-> value-signal? any)]
[reactor-safe? (-> reactor? any/c)]
[signal-name (-> signal? (and/c symbol? (not/c symbol-interned?)))]
[signal=? (-> signal? signal? any/c)]
[reactor-continuation-marks
(-> (and/c reactor? reactor-safe?)
continuation-mark-set-tree?)]
[continuation-mark-set-tree->tree
(-> continuation-mark-set-tree? any/c tree?)]
;; running
[prime (->i ([p (args) (procedure-arity-includes/c (length args))])
#:rest [args any/c]
[_ reactor?])]
[react! (-> (and/c reactor? reactor-safe?) (or/c pure-signal? (list/c value-signal? (listof any/c))) ... any)])
;; forms
signal/c
present&
(rename-out [signal* signal])
define-signal
par&
emit&
pause&
await&
await*&
suspend&
abort&
loop&
halt&
with-handlers&
reactive->)
(require "data.rkt" "runtime.rkt" "compiler.rkt" "ct.rkt")
(module reader syntax/module-reader
reactor/lang)