Implement reusable interface conformance rules

This commit is contained in:
Timothy J. Aveni
2026-09-23 00:17:13 -07:00
parent 20e9f4b056
commit 8455599c3c
14 changed files with 2387 additions and 1638 deletions
+3 -3
View File
@@ -19,9 +19,9 @@ const compile = (policy = `crdt(${content})`, binding = "edit") =>
`
workspace Comments id "w" revision "w@1" commit "${"a".repeat(40)}" {
import interface Comment;
atom Comment id "comment";
conform Comment as Comment id "owner:comment" {
private state Content id "content" on Comment : ${content} policy ${policy};
atom CommentAtom id "comment";
conform CommentAtom as Comment id "owner:comment" {
private state Content id "content" on CommentAtom : ${content} policy ${policy};
initialize { content to state Content; };
bind content.get to state Content.read;
bind content.edit to state Content.${binding};