adds sample type to +get:by, fixes call-sites

This commit is contained in:
Joe Bryan 2019-07-17 14:57:01 -07:00
parent b9bb1d81ee
commit b5d02a0082
8 changed files with 19 additions and 14 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:054d477c7747198b4bbfa1027715ea445696af7eedffb63abe03b8ed80e51546
size 9211844
oid sha256:7fb2efecc5b3fb277e0d634b12afdda6cf9ffab75ac351fefbd7dfa393f7c5cd
size 9299426

View File

@ -149,10 +149,10 @@
=. ..this (give-result path %dns-request i.requests)
loop(requests t.requests)
::
=/ who (slaw %p i.path)
=/ who=(unit @p) (slaw %p i.path)
?~ who
~| %invalid-path !!
?~ dun=(~(get by completed.state) who)
?~ dun=(~(get by completed.state) u.who)
this
(give-result path %dns-binding u.dun)
--

View File

@ -3293,7 +3293,7 @@
|= {t/telegram c/@ud k/(map serial @ud) s/(map circle (list @ud))}
:+ +(c) (~(put by k) uid.t c)
=/ src/circle
?: (~(has by aud.t) [our.bol nom]) [our.bol nom]
?: (~(has in aud.t) [our.bol nom]) [our.bol nom]
?~ aud.t ~&(%strange-aud [our.bol %inbox])
n.aud.t
%+ ~(put by s) src

View File

@ -1391,13 +1391,15 @@
::
:: prints binding details. goes both ways.
::
:: XX this type is a misjunction, audience can be ~
::
|= qur/(unit $@(char audience))
^+ ..sh-work
?^ qur
?^ u.qur
=+ cha=(~(get by bound) u.qur)
(sh-fact %txt ?~(cha "none" [u.cha]~))
=+ pan=~(tap in (~(get ju binds) u.qur))
=+ pan=~(tap in (~(get ju binds) `@t`u.qur))
?: =(~ pan) (sh-fact %txt "~")
=< (sh-fact %mor (turn pan .))
|=(a/audience [%txt ~(ar-phat ar a)])

View File

@ -1479,13 +1479,13 @@
::
++ get :: grab value by key
~/ %get
|= b/*
^- {$@(~ {~ u/_?>(?=(^ a) q.n.a)})}
=+ 42
|* b=*
=> .(b `_?>(?=(^ a) p.n.a)`b)
|- ^- (unit _?>(?=(^ a) q.n.a))
?~ a
~
?: =(b p.n.a)
[~ u=q.n.a]
(some q.n.a)
?: (gor b p.n.a)
$(a l.a)
$(a r.a)

View File

@ -2271,7 +2271,7 @@
::
u.existing
::
=/ already-heard=? (~(has by fragments.partial-rcv-message) seq)
=/ already-heard=? (~(has by fragments.partial-rcv-message) `^fragment-num``@`seq)
:: ack dupes except for the last fragment, in which case drop
::
?: already-heard

View File

@ -2264,7 +2264,7 @@
:: These convert between aeon (version number), tako (commit hash), yaki
:: (commit data structure), lobe (content hash), and blob (content).
++ aeon-to-tako ~(got by hit.dom)
++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki)
++ aeon-to-yaki |=(=aeon (tako-to-yaki (aeon-to-tako aeon)))
++ lobe-to-blob ~(got by lat.ran)
++ tako-to-yaki ~(got by hut.ran)
++ lobe-to-mark
@ -3670,8 +3670,11 @@
|%
:: These convert between aeon (version number), tako (commit hash), yaki
:: (commit data structure), lobe (content hash), and blob (content).
::
:: XX the following are duplicated from the +state core
::
++ aeon-to-tako ~(got by hit.dom)
++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki)
++ aeon-to-yaki |=(=aeon (tako-to-yaki (aeon-to-tako aeon)))
++ lobe-to-blob ~(got by lat.ran)
++ tako-to-yaki ~(got by hut.ran)
++ page-to-lobe page-to-lobe:util

View File

@ -1042,7 +1042,7 @@
%.n
:: is this a session that we know about?
::
?~ session=(~(get by sessions.authentication-state.state) u.session-id)
?~ session=(~(get by sessions.authentication-state.state) `@uv`u.session-id)
%.n
:: is this session still valid?
::