Shuffle imports

This commit is contained in:
Emery Hemingway 2024-01-06 13:55:48 +02:00
parent 3cc3a48c82
commit e48c62f448
4 changed files with 7 additions and 9 deletions

View File

@ -11,7 +11,7 @@ export fromPreserves, toPreserves
import ./syndicate/[actors, dataspaces, durings, patterns] import ./syndicate/[actors, dataspaces, durings, patterns]
import ./syndicate/protocols/dataspace import ./syndicate/protocols/dataspace
export actors, dataspaces, patterns export actors, dataspace, dataspaces, patterns
type Assertion* {.deprecated: "Assertion and Preserve[void] replaced by Value".} = Value type Assertion* {.deprecated: "Assertion and Preserve[void] replaced by Value".} = Value
@ -34,7 +34,6 @@ proc `??`*(pat: Pattern; bindings: openArray[(int, Pattern)]): Pattern {.inline.
patterns.inject(pat, bindings) patterns.inject(pat, bindings)
type type
Observe* = dataspace.Observe
PublishProc = proc (turn: var Turn; v: Value; h: Handle) {.closure, gcsafe.} PublishProc = proc (turn: var Turn; v: Value; h: Handle) {.closure, gcsafe.}
RetractProc = proc (turn: var Turn; h: Handle) {.closure, gcsafe.} RetractProc = proc (turn: var Turn; h: Handle) {.closure, gcsafe.}
MessageProc = proc (turn: var Turn; v: Value) {.closure, gcsafe.} MessageProc = proc (turn: var Turn; v: Value) {.closure, gcsafe.}

View File

@ -5,12 +5,6 @@ import std/[hashes, tables]
import preserves import preserves
import ./actors, ./patterns, ./protocols/dataspace import ./actors, ./patterns, ./protocols/dataspace
from ./protocols/protocol import Handle
type
Observe = dataspace.Observe
Turn = actors.Turn
type type
DuringProc* = proc (turn: var Turn; a: Value; h: Handle): TurnAction {.gcsafe.} DuringProc* = proc (turn: var Turn; a: Value; h: Handle): TurnAction {.gcsafe.}
DuringActionKind = enum null, dead, act DuringActionKind = enum null, dead, act

View File

@ -1,6 +1,6 @@
# Package # Package
version = "20240101" version = "20240106"
author = "Emery Hemingway" author = "Emery Hemingway"
description = "Syndicated actors for conversational concurrency" description = "Syndicated actors for conversational concurrency"
license = "Unlicense" license = "Unlicense"

View File

@ -89,3 +89,8 @@ suite "later-than":
test $patB: test $patB:
checkpoint $obsA checkpoint $obsA
check patB.matches obsA check patB.matches obsA
suite "Observe":
let pat = ?:Observe
const text = """<rec Observe [<bind <_>> <bind <_>>]>"""
check $pat == text