Fix previous commit.

This commit is contained in:
C. Guy Yarvin 2018-03-19 10:43:25 -07:00
parent 3afa0876d3
commit 3ffa56cbbd
4 changed files with 51 additions and 48 deletions

View File

@ -166,7 +166,7 @@
^+ ?~(a !! *(map _p.n.a _(need (b q.n.a))))
%- malt
%+ murn ~(tap by a)
?~ a ~
?~ a ,~
|: c=n.a ^- (unit _[p.n.a (need (b q.n.a))])
=+ d=(b q.c)
?~(d ~ (some [p.c u.d]))

View File

@ -6805,10 +6805,17 @@
|- ^- hoon
?- mod
{$base *} (basal p.mod)
{$bcts *} [%ktts p.mod $(mod q.mod)]
{$dbug *} [%dbug p.mod $(mod q.mod)]
{$bcsg *} p.mod
{$bcwt *} :: use last entry
{$halo *} $(mod q.mod)
{$leaf *} [%rock p.mod q.mod]
{$over *} $(hay p.mod, mod q.mod)
::
{$bccb *} [%rock %n 0]
{$bccl *} |- ^- hoon
?~ t.p.mod ^$(mod i.p.mod)
:- ^$(mod i.p.mod)
$(i.p.mod i.t.p.mod, t.p.mod t.t.p.mod)
{$bccn *} :: use last entry
::
|- ^- hoon
?~ t.p.mod ^$(mod i.p.mod)
@ -6816,24 +6823,18 @@
{$bchp *} :: see under %bccb
::
[%rock %n 0]
{$bckt *} $(mod q.mod)
{$bcmc *} :: borrow sample
::
[%tsgl [%$ 6] p.mod]
{$bccn *} :: use last entry
{$bcsg *} p.mod
{$bcts *} [%ktts p.mod $(mod q.mod)]
{$bcvt *} $(mod p.mod)
{$bcwt *} :: use last entry
::
|- ^- hoon
?~ t.p.mod ^$(mod i.p.mod)
$(i.p.mod i.t.p.mod, t.p.mod t.t.p.mod)
{$leaf *} [%rock p.mod q.mod]
{$over *} $(hay p.mod, mod q.mod)
{$halo *} $(mod q.mod)
{$bcvt *} $(mod p.mod)
{$bccl *} |- ^- hoon
?~ t.p.mod ^$(mod i.p.mod)
:- ^$(mod i.p.mod)
$(i.p.mod i.t.p.mod, t.p.mod t.t.p.mod)
{$bckt *} $(mod q.mod)
{$bccb *} [%rock %n 0]
==
::
++ example
@ -6842,11 +6843,11 @@
~+
^- hoon
?+ mod
:: default approach: build a trivial
:: any example can be made by analyzing a spore
::
:+ %tsls
spore
~(relative local:(descend 3) 2)
~(relative analyze:(descend 3) 2)
::
{$base *} (decorate (basal p.mod))
{$bcts *} (decorate [%ktts p.mod example:clear(mod q.mod)])
@ -6877,19 +6878,20 @@
?: ?=($bcsg -.mod) factory(mod q.mod, def `p.mod)
^- hoon
?: ?=([%bcmc *] mod)
:: don't re-indirect through handmade molds
:: collapse trivial indirection
::
(home p.mod)
(decorate (home p.mod))
=- :: for basic molds that don't need the subject,
:: clear it so constants fold better
::
?. clean -
[%tsgr [%rock %n 0] -]
:: -
:^ %brcl ~^~
[%ktsg spore]
~(relative local:(descend 7) 6)
~(relative analyze:(descend 7) 6)
::
++ local
++ analyze
:: normalize a fragment of the subject
::
|_ $: :: axe: axis to fragment
@ -6927,7 +6929,7 @@
[%rock %n ~]
==
++ clear
.(..local ^clear)
.(..analyze ^clear)
++ fetch
:: load the fragment
::

View File

@ -1,3 +1,4 @@
!:
:: clay (4c), revision control
::
:: This is split in three top-level sections: structure definitions, main
@ -1531,13 +1532,13 @@
~| :* %bad-foreign-update
:* gar=gar
let=let
nut=(~(run by nut) ~)
nat=(~(run by nat) ~)
nut=(~(run by nut) ,~)
nat=(~(run by nat) ,~)
==
:* hitdom=hit.dom
letdom=let.dom
hutran=(~(run by hut.ran) ~)
latran=(~(run by lat.ran) ~)
hutran=(~(run by hut.ran) ,~)
latran=(~(run by lat.ran) ,~)
==
==
=+ hit=(~(uni by hit.dom) gar)
@ -1862,7 +1863,7 @@
?: =(0 let.dom) [~ 0] :: avoid underflow
?: %+ gte p.lok
=< t
~| [%letdom let=let.dom hit=hit.dom hut=(~(run by hut.ran) ~)]
~| [%letdom let=let.dom hit=hit.dom hut=(~(run by hut.ran) ,~)]
~| [%getdom (~(get by hit.dom) let.dom)]
%- aeon-to-yaki
let.dom
@ -2690,7 +2691,7 @@
%- ~(uni by `(map path *)`can.dob.dat)
`(map path *)`old.dob.dat
?^ bof
(error:he %meet-conflict >(~(run by `(map path *)`bof) ~)< ~)
(error:he %meet-conflict >(~(run by `(map path *)`bof) ,~)< ~)
=+ ^- old/(map path lobe)
%+ roll ~(tap by (~(uni by old.dal.dat) old.dob.dat))
=< .(old q.bas.dat)

View File

@ -234,8 +234,8 @@
|= {a/cafe b/gage}
?- -.b
$tabl (err:bo a >%bad-marc< ~)
$| (err:bo a p.b)
$& (new:bo a p.b)
%| (err:bo a p.b)
%& (new:bo a p.b)
==
::
++ catch-error
@ -371,18 +371,18 @@
$0 [%0 p=*(set dent) q=(fun p.ton)]
$1 :: ~& [%from-toon:bo-need ((list path) p.ton)]
=- ?- -.faw :: TODO =;
$& :- %1
%& :- %1
^= p
%- silt
%+ turn p.faw
|=(a/{vane care:clay beam} [-.a +<.a +>.a *tang])
$| [%2 p=*(set dent) q=p.faw]
%| [%2 p=*(set dent) q=p.faw]
==
^= faw
|- ^- (each (list (trel vane care:clay beam)) tang)
?~ p.ton [%& ~]
=+ nex=$(p.ton t.p.ton)
=+ err=|=(a/tape [%| leaf+a ?:(?=($& -.nex) ~ p.nex)])
=+ err=|=(a/tape [%| leaf+a ?:(?=(%& -.nex) ~ p.nex)])
=+ pax=(path i.p.ton)
?~ pax (err "blocking empty")
=+ ren=((soft care:clay) (rsh 3 1 i.pax))
@ -393,13 +393,13 @@
(err "blocking not beam: {<t.pax>}")
?: ?=($g (end 3 1 i.pax))
?- -.nex
$& [%& [%g u.ren u.zis] p.nex]
$| nex
%& [%& [%g u.ren u.zis] p.nex]
%| nex
==
?: ?=($c (end 3 1 i.pax))
?- -.nex
$& [%& [%c u.ren u.zis] p.nex]
$| nex
%& [%& [%c u.ren u.zis] p.nex]
%| nex
==
(err "blocking bad vane")
==
@ -409,8 +409,8 @@
|* {tod/(each * tang) fun/gate}
%+ (from-toon cof)
?- -.tod
$& [%0 p=p.tod]
$| [%2 p=p.tod]
%& [%0 p=p.tod]
%| [%2 p=p.tod]
==
fun
::
@ -1064,7 +1064,7 @@
?> ?=($g van)
=. kig (~(del in kig) +<-.$) :: TODO rename kig
=. pass (pass (cancel van ren bem))
?: ?=($| -.gag)
?: ?=(%| -.gag)
abut:(give [%made dep %| leaf+"ford-scry-made-fail" p.gag])
?: ?=($tabl -.gag)
abut:(give [%made dep %| leaf+"ford-scry-made-strange" ~])
@ -1376,7 +1376,7 @@
~[leaf+"ford: keel" rose+[" " ~ ~]^(murn yom +)]
|= {a/wing b/type *} ^- (unit tank)
=+ typ=(mule |.(p:(slap suh wing+a)))
?: ?=($| -.typ)
?: ?=(%| -.typ)
(some (show [%c %pull] %l a))
?: (~(nest ut p.typ) | b) ~
%^ some %palm ["." ~ ~ ~]
@ -1650,8 +1650,8 @@
|= {cof/cafe sut/type gen/hoon}
=+ puz=(mule |.((~(mint ut sut) [%noun gen])))
?- -.puz
$| (err:bo cof p.puz)
$& (new:bo cof p.puz)
%| (err:bo cof p.puz)
%& (new:bo cof p.puz)
==
::
++ wrapped-slap
@ -1860,8 +1860,8 @@
%+ admit:bo |.(%.(%want ~(dunk ut (~(peek ut gat) %free 6))))
=+ top=(mule |.((slit gat sam)))
?- -.top
$| (err:bo cof p.top)
$& (new:bo cof p.top)
%| (err:bo cof p.top)
%& (new:bo cof p.top)
==
::
++ maul :: slam
@ -2139,8 +2139,8 @@
|= {cof/cafe hop/hoop}
^- (bolt _..wilt)
?- -.hop
$& (new:bo cof ..wilt(boy [p.hop boy]))
$|
%& (new:bo cof ..wilt(boy [p.hop boy]))
%|
=. r.p.hop ?:(?=({$ud $0} r.p.hop) r.how r.p.hop)
%+ admit:bo |.(leaf+"ford: wilt {<[(en-beam p.hop)]>}")
%+ tug:bo (load-arch cof p.hop)