Expose `perform-core-action!`.
This commit is contained in:
parent
bd0278297b
commit
97dceedff2
|
@ -13,6 +13,7 @@
|
||||||
send!
|
send!
|
||||||
return!
|
return!
|
||||||
return/no-link-result!
|
return/no-link-result!
|
||||||
|
perform-core-action!
|
||||||
|
|
||||||
;; forall
|
;; forall
|
||||||
|
|
||||||
|
@ -83,9 +84,9 @@
|
||||||
;;
|
;;
|
||||||
;; Patch Instructions are issued when the actor uses `assert!` and
|
;; Patch Instructions are issued when the actor uses `assert!` and
|
||||||
;; `retract!`. Action instructions are issued when the actor uses
|
;; `retract!`. Action instructions are issued when the actor uses
|
||||||
;; `do!`, and return instructions when `return!` is called.
|
;; `perform-core-action!`, and return instructions when `return!` is
|
||||||
;; Script-complete instructions are automatically issued when a Script
|
;; called. Script-complete instructions are automatically issued when
|
||||||
;; terminates successfully.
|
;; a Script terminates successfully.
|
||||||
;;
|
;;
|
||||||
;; Spawn instructions are issued when `actor`, `network`, and `state`
|
;; Spawn instructions are issued when `actor`, `network`, and `state`
|
||||||
;; are used, directly or indirectly. (TODO: `background`?) The
|
;; are used, directly or indirectly. (TODO: `background`?) The
|
||||||
|
@ -184,10 +185,10 @@
|
||||||
|
|
||||||
;; Returns void
|
;; Returns void
|
||||||
(define (send! M #:meta-level [meta-level 0])
|
(define (send! M #:meta-level [meta-level 0])
|
||||||
(do! (message (prepend-at-meta M meta-level))))
|
(perform-core-action! (message (prepend-at-meta M meta-level))))
|
||||||
|
|
||||||
;; Returns void
|
;; Returns void
|
||||||
(define (do! A)
|
(define (perform-core-action! A)
|
||||||
(call-in-raw-context
|
(call-in-raw-context
|
||||||
(lambda (k) (action-instruction A k))))
|
(lambda (k) (action-instruction A k))))
|
||||||
|
|
||||||
|
@ -248,7 +249,7 @@
|
||||||
(expand-state 'network
|
(expand-state 'network
|
||||||
#'(I
|
#'(I
|
||||||
...
|
...
|
||||||
(do! (quit-world))
|
(perform-core-action! (quit-world))
|
||||||
(return/no-link-result!))
|
(return/no-link-result!))
|
||||||
#'()
|
#'()
|
||||||
#'()
|
#'()
|
||||||
|
@ -390,7 +391,6 @@
|
||||||
;; Compilation of HLL actors
|
;; Compilation of HLL actors
|
||||||
|
|
||||||
;; TODO: track
|
;; TODO: track
|
||||||
;; TODO: clean way of spawning low-level actors from hll
|
|
||||||
;; TODO: default to hll
|
;; TODO: default to hll
|
||||||
|
|
||||||
(begin-for-syntax
|
(begin-for-syntax
|
||||||
|
|
|
@ -34,12 +34,12 @@
|
||||||
(send! (shutdown))
|
(send! (shutdown))
|
||||||
(send! (says user input-string)))))))
|
(send! (says user input-string)))))))
|
||||||
|
|
||||||
(spawn-tcp-driver)
|
|
||||||
|
|
||||||
(%%boot
|
(%%boot
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(actor
|
(actor
|
||||||
|
|
||||||
|
(perform-core-action! (spawn-tcp-driver))
|
||||||
|
|
||||||
(network (define us (tcp-listener 5000))
|
(network (define us (tcp-listener 5000))
|
||||||
(until (message (shutdown))
|
(until (message (shutdown))
|
||||||
(assert (advertise (observe (tcp-channel _ us _))) #:meta-level 1)
|
(assert (advertise (observe (tcp-channel _ us _))) #:meta-level 1)
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
(struct save (file) #:prefab)
|
(struct save (file) #:prefab)
|
||||||
(struct delete (name) #:prefab)
|
(struct delete (name) #:prefab)
|
||||||
|
|
||||||
(spawn-timer-driver)
|
|
||||||
|
|
||||||
(%%boot
|
(%%boot
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(actor
|
(actor
|
||||||
|
|
||||||
|
(perform-core-action! (spawn-timer-driver))
|
||||||
|
|
||||||
(actor (forever #:collect [(files (hash))]
|
(actor (forever #:collect [(files (hash))]
|
||||||
(on (asserted (observe (file $name _)))
|
(on (asserted (observe (file $name _)))
|
||||||
(printf "At least one reader exists for ~v\n" name)
|
(printf "At least one reader exists for ~v\n" name)
|
||||||
|
|
Loading…
Reference in New Issue