clay: fix %mime->%hoon bootstrapping
++ get-value
|= =path
^- [cage state]
- ~| %error-validating-path^path
+ ~| %error-validating^path
?^ got=(~(get by baked.nub) path)
[u.got nub]
=; [res=cage bun=state]
[p.u.change nub]
~| %ugly-lobe^p.u.change^path
(lobe-to-page p.u.change)
- =^ cage nub (validate-path path page)
+ =^ cage nub (validate-page path page)
[cage nub]
?< (~(has in deletes) path)
:_(nub (need (~(get an ankh) path)))
|= [a=mark b=mark]
^- [tube state]
~| error-building-cast+[a b]
+ ?: =([%mime %hoon] [a b])
+ :_ nub
+ |= sam=vase
+ =+ !<(=mime sam)
+ !>(q.q.mime)
?^ got=(~(get by casts.cache.nub) [a b])
=? stack.nub ?=(^ stack.nub)
stack.nub(i (~(uni in i.stack.nub) dez.u.got))
[[p q.q]:cage nub]
==
::
- ++ validate-path
+ ++ validate-page
|= [=path =page]
^- [cage state]
+ ~| validate-page-fail+path^from+p.page
=/ mak=mark (head (flop path))
?: =(mak p.page)
(page-to-cage page)
^- [cage state]
?: =(%hoon p.page)
:_(nub [%hoon -:!>(*@t) q.page])
+ ?: =(%mime p.page)
+ :_(nub [%mime !>(;;(mime q.page))])
=^ =dais nub (get-mark p.page)
:_(nub [p.page (vale:dais q.page)])
::
?~ paz ~|(no-file+pre^pax !!)
=/ pux=path pre^(snoc i.paz %hoon)
?: (~(has in deletes) pux)
- ~& path-in-deletes+pux
$(paz t.paz)
?: (~(has by changes) pux)
- ~& path-in-changes+pux
pux
?^ (~(get an ankh) pux)
- ~& path-in-ankh+pux
pux
- ~& path-not-in-ankh+pux
$(paz t.paz)
--
--
