mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 12:51:51 +03:00
hoon: doccords for core chapters
this populates the $what in $tome
This commit is contained in:
parent
cdaf23a184
commit
336817d5bc
@ -13336,31 +13336,32 @@
|
|||||||
++ wisp !: :: core tail
|
++ wisp !: :: core tail
|
||||||
?. tol fail
|
?. tol fail
|
||||||
%+ cook
|
%+ cook
|
||||||
|= a=(list (pair term (map term hoon)))
|
|= a=(list [wit=whit wap=(pair term (map term hoon))])
|
||||||
^- (map term tome)
|
^- (map term tome)
|
||||||
=< p
|
=< p
|
||||||
|- ^- (pair (map term tome) (map term hoon))
|
|- ^- (pair (map term tome) (map term hoon))
|
||||||
?~ a [~ ~]
|
?~ a [~ ~]
|
||||||
=/ mor $(a t.a)
|
=/ mor $(a t.a)
|
||||||
=. q.i.a
|
=. q.wap.i.a
|
||||||
%- ~(urn by q.i.a)
|
%- ~(urn by q.wap.i.a)
|
||||||
|= b=(pair term hoon) ^+ +.b
|
|= b=(pair term hoon) ^+ +.b
|
||||||
|
:: tests for duplicate arms between two chapters
|
||||||
?. (~(has by q.mor) p.b) +.b
|
?. (~(has by q.mor) p.b) +.b
|
||||||
[%eror (weld "duplicate arm: +" (trip p.b))]
|
[%eror (weld "duplicate arm: +" (trip p.b))]
|
||||||
:_ (~(uni by q.mor) q.i.a)
|
:_ (~(uni by q.mor) q.wap.i.a)
|
||||||
%+ ~(put by p.mor)
|
%+ ~(put by p.mor)
|
||||||
p.i.a
|
p.wap.i.a
|
||||||
:- *what
|
:- boy.wit.i.a :: body of the whit set as the what
|
||||||
?. (~(has by p.mor) p.i.a)
|
?. (~(has by p.mor) p.wap.i.a)
|
||||||
q.i.a
|
q.wap.i.a
|
||||||
[[%$ [%eror (weld "duplicate chapter: |" (trip p.i.a))]] ~ ~]
|
[[%$ [%eror (weld "duplicate chapter: |" (trip p.wap.i.a))]] ~ ~]
|
||||||
::
|
::
|
||||||
;~ pose
|
;~ pose
|
||||||
dun
|
dun
|
||||||
;~ sfix
|
;~ sfix
|
||||||
;~ pose
|
;~ pose
|
||||||
(most muck ;~(pfix (jest '+|') ;~(pfix gap whip)))
|
(most muck ;~(plug apex:docs ;~(pfix (jest '+|') ;~(pfix gap whip))))
|
||||||
;~(plug (stag %$ whap) (easy ~))
|
;~(plug (stag *whit (stag %$ whap)) (easy ~))
|
||||||
==
|
==
|
||||||
gap
|
gap
|
||||||
dun
|
dun
|
||||||
|
Loading…
Reference in New Issue
Block a user