mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
graph-validators: speed up validators by adding type casts
This commit is contained in:
parent
9cff3ba724
commit
3c8ac1edb1
@ -1,4 +1,4 @@
|
||||
/- *post, met=metadata-store
|
||||
/- *post, met=metadata-store, graph=graph-store, hark=hark-graph-hook
|
||||
|_ i=indexed-post
|
||||
++ grow
|
||||
|%
|
||||
@ -6,17 +6,20 @@
|
||||
::
|
||||
++ graph-permissions-add
|
||||
|= vip=vip-metadata:met
|
||||
^- permissions:graph
|
||||
?+ index.p.i !!
|
||||
[@ ~] [%yes %yes %no]
|
||||
==
|
||||
::
|
||||
++ graph-permissions-remove
|
||||
|= vip=vip-metadata:met
|
||||
^- permissions:graph
|
||||
?+ index.p.i !!
|
||||
[@ ~] [%self %self %no]
|
||||
==
|
||||
::
|
||||
++ notification-kind
|
||||
^- (unit notif-kind:hark)
|
||||
?+ index.p.i ~
|
||||
[@ ~] `[%message [0 1] %count %none]
|
||||
==
|
||||
|
@ -1,4 +1,4 @@
|
||||
/- *post, met=metadata-store
|
||||
/- *post, met=metadata-store, graph=graph-store, hark=hark-graph-hook
|
||||
|_ i=indexed-post
|
||||
++ grow
|
||||
|%
|
||||
@ -6,6 +6,7 @@
|
||||
::
|
||||
++ graph-permissions-add
|
||||
|= vip=vip-metadata:met
|
||||
^- permissions:graph
|
||||
=/ reader
|
||||
?=(%reader-comments vip)
|
||||
?+ index.p.i !!
|
||||
@ -16,6 +17,7 @@
|
||||
::
|
||||
++ graph-permissions-remove
|
||||
|= vip=vip-metadata:met
|
||||
^- permissions:graph
|
||||
=/ reader
|
||||
?=(%reader-comments vip)
|
||||
?+ index.p.i !!
|
||||
@ -25,6 +27,7 @@
|
||||
==
|
||||
::
|
||||
++ notification-kind
|
||||
^- (unit notif-kind:hark)
|
||||
?+ index.p.i ~
|
||||
[@ ~] `[%link [0 1] %each %children]
|
||||
[@ @ %1 ~] `[%comment [1 2] %count %siblings]
|
||||
|
@ -1,10 +1,11 @@
|
||||
/- *post, met=metadata-store
|
||||
/- *post, met=metadata-store, graph=graph-store, hark=hark-graph-hook
|
||||
|_ i=indexed-post
|
||||
++ grow
|
||||
|%
|
||||
++ noun i
|
||||
++ graph-permissions-add
|
||||
|= vip=vip-metadata:met
|
||||
^- permissions:graph
|
||||
?+ index.p.i !!
|
||||
[@ ~] [%yes %yes %no] :: new note
|
||||
[@ %1 @ ~] [%self %self %no]
|
||||
@ -14,6 +15,7 @@
|
||||
::
|
||||
++ graph-permissions-remove
|
||||
|= vip=vip-metadata:met
|
||||
^- permissions:graph
|
||||
?+ index.p.i !!
|
||||
[@ ~] [%yes %self %self]
|
||||
[@ %1 @ @ ~] [%yes %self %self]
|
||||
@ -24,6 +26,7 @@
|
||||
:: ignore all containers, only notify on content
|
||||
::
|
||||
++ notification-kind
|
||||
^- (unit notif-kind:hark)
|
||||
?+ index.p.i ~
|
||||
[@ %1 %1 ~] `[%note [0 1] %each %children]
|
||||
[@ %1 @ ~] `[%edit-note [0 1] %none %none]
|
||||
|
Loading…
Reference in New Issue
Block a user