From a5d661f2d17a2bc4a72f921a6fb73b0c03ae5cff Mon Sep 17 00:00:00 2001 From: ronreg-ribdev Date: Mon, 2 Nov 2020 11:02:53 -0800 Subject: [PATCH] mar: use new-style gate argument syntax in /mar Switch a bunch of .hoon files in /mar from using the old `{}` syntax for specifying argument types, to the newer `[argname=argtype]` syntax. --- pkg/arvo/mar/css.hoon | 2 +- pkg/arvo/mar/hoon.hoon | 2 +- pkg/arvo/mar/html.hoon | 2 +- pkg/arvo/mar/js.hoon | 2 +- pkg/arvo/mar/json.hoon | 2 +- pkg/arvo/mar/mime.hoon | 2 +- pkg/arvo/mar/png.hoon | 2 +- pkg/arvo/mar/snip.hoon | 8 ++++---- pkg/arvo/mar/tang.hoon | 4 ++-- pkg/arvo/mar/txt.hoon | 26 +++++++++++++------------- pkg/arvo/mar/xml.hoon | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pkg/arvo/mar/css.hoon b/pkg/arvo/mar/css.hoon index 39e9bc945..f41e3390d 100644 --- a/pkg/arvo/mar/css.hoon +++ b/pkg/arvo/mar/css.hoon @@ -14,7 +14,7 @@ -- ++ grab |% :: convert from - ++ mime |=({p/mite q/octs} (@t q.q)) + ++ mime |=([p=mite q=octs] (@t q.q)) ++ noun @t :: clam from %noun -- ++ grad %mime diff --git a/pkg/arvo/mar/hoon.hoon b/pkg/arvo/mar/hoon.hoon index cd582f8a7..3b4201aec 100644 --- a/pkg/arvo/mar/hoon.hoon +++ b/pkg/arvo/mar/hoon.hoon @@ -41,7 +41,7 @@ -- ++ grab |% :: convert from - ++ mime |=({p/mite q/octs} q.q) + ++ mime |=([p=mite q=octs] q.q) ++ noun @t :: clam from %noun ++ txt of-wain:format -- diff --git a/pkg/arvo/mar/html.hoon b/pkg/arvo/mar/html.hoon index c6aeef3bc..8c89e536d 100644 --- a/pkg/arvo/mar/html.hoon +++ b/pkg/arvo/mar/html.hoon @@ -17,7 +17,7 @@ ++ grab ^? |% :: convert from ++ noun @t :: clam from %noun - ++ mime |=({p/mite q/octs} q.q) :: retrieve form $mime + ++ mime |=([p=mite q=octs] q.q) :: retrieve form $mime -- ++ grad %mime -- diff --git a/pkg/arvo/mar/js.hoon b/pkg/arvo/mar/js.hoon index 1c997c7ad..4b06573c7 100644 --- a/pkg/arvo/mar/js.hoon +++ b/pkg/arvo/mar/js.hoon @@ -15,7 +15,7 @@ -- ++ grab |% :: convert from - ++ mime |=({p/mite q/octs} (@t q.q)) + ++ mime |=([p=mite q=octs] (@t q.q)) ++ noun cord :: clam from %noun -- ++ grad %mime diff --git a/pkg/arvo/mar/json.hoon b/pkg/arvo/mar/json.hoon index 967b60868..e79bc7cd8 100644 --- a/pkg/arvo/mar/json.hoon +++ b/pkg/arvo/mar/json.hoon @@ -17,7 +17,7 @@ -- ++ grab |% :: convert from - ++ mime |=({p/mite q/octs} (fall (rush (@t q.q) apex:de-json) *json)) + ++ mime |=([p=mite q=octs] (fall (rush (@t q.q) apex:de-json) *json)) ++ noun json :: clam from %noun ++ numb numb:enjs ++ time time:enjs diff --git a/pkg/arvo/mar/mime.hoon b/pkg/arvo/mar/mime.hoon index f5b1850a0..222047545 100644 --- a/pkg/arvo/mar/mime.hoon +++ b/pkg/arvo/mar/mime.hoon @@ -16,7 +16,7 @@ |% +$ noun mime :: clam from %noun ++ tape - |=(a/_"" [/application/x-urb-unknown (as-octt:mimes:html a)]) + |=(a=^tape [/application/x-urb-unknown (as-octt:mimes:html a)]) -- ++ grad ^? diff --git a/pkg/arvo/mar/png.hoon b/pkg/arvo/mar/png.hoon index 4bc5b6b3d..145b21385 100644 --- a/pkg/arvo/mar/png.hoon +++ b/pkg/arvo/mar/png.hoon @@ -5,7 +5,7 @@ -- ++ grab |% - ++ mime |=({p/mite q/octs} q.q) + ++ mime |=([p=mite q=octs] q.q) ++ noun @t -- ++ grad %mime diff --git a/pkg/arvo/mar/snip.hoon b/pkg/arvo/mar/snip.hoon index e6eb3225e..302cf0b79 100644 --- a/pkg/arvo/mar/snip.hoon +++ b/pkg/arvo/mar/snip.hoon @@ -7,7 +7,7 @@ ++ words 1 ++ hedtal =| met/marl - |= a/marl ^- {hed/marl tal/marl} + |= a=marl ^- {hed/marl tal/marl} ?~ a [~ ~] ?. ?=($h1 n.g.i.a) ?: ?=($meta n.g.i.a) @@ -18,7 +18,7 @@ [c.i.a (weld (flop met) (limit words t.a))] :: ++ limit - |= {lim/@u mal/marl} + |= [lim=@u mal=marl] =< res |- ^- {rem/@u res/marl} ?~ mal [lim ~] @@ -30,7 +30,7 @@ [rem - res]:[hed $(lim lam, mal t.mal)] :: ++ deword - |= {lim/@u tay/tape} ^- {lim/@u tay/tape} + |= [lim=@u tay=tape] ^- {lim/@u tay/tape} ?~ tay [lim tay] ?~ lim [0 ~] =+ wer=(dot 1^1 tay) @@ -58,5 +58,5 @@ -- ++ grab |% :: convert from ++ noun {marl marl} :: clam from $noun - ++ elem |=(a/manx (hedtal +.a)) + ++ elem |=(a=manx (hedtal +.a)) -- -- diff --git a/pkg/arvo/mar/tang.hoon b/pkg/arvo/mar/tang.hoon index 684751543..2e212b13d 100644 --- a/pkg/arvo/mar/tang.hoon +++ b/pkg/arvo/mar/tang.hoon @@ -12,11 +12,11 @@ ++ elem =- ;pre:code:"{(of-wall -)}" ^- wall %- zing ^- (list wall) - (turn (flop tan) |=(a/tank (wash 0^160 a))) + (turn (flop tan) |=(a=tank (wash 0^160 a))) -- ++ grab :: convert from |% ++ noun (list ^tank) :: clam from %noun - ++ tank |=(a/^tank [a]~) + ++ tank |=(a=^tank [a]~) -- -- diff --git a/pkg/arvo/mar/txt.hoon b/pkg/arvo/mar/txt.hoon index 20ca73547..4ea82b7e9 100644 --- a/pkg/arvo/mar/txt.hoon +++ b/pkg/arvo/mar/txt.hoon @@ -24,18 +24,18 @@ |% ++ form %txt-diff ++ diff - |= tyt/wain + |= tyt=wain ^- (urge cord) (lusk txt tyt (loss txt tyt)) :: ++ pact - |= dif/(urge cord) + |= dif=(urge cord) ~| [%pacting dif] ^- wain (lurk txt dif) :: ++ join - |= {ali/(urge cord) bob/(urge cord)} + |= [ali=(urge cord) bob=(urge cord)] ^- (unit (urge cord)) |^ =. ali (clean ali) @@ -49,20 +49,20 @@ %& ?: =(p.i.ali p.i.bob) %+ bind $(ali t.ali, bob t.bob) - |=(cud/(urge cord) [i.ali cud]) + |=(cud=(urge cord) [i.ali cud]) ?: (gth p.i.ali p.i.bob) %+ bind $(p.i.ali (sub p.i.ali p.i.bob), bob t.bob) - |=(cud/(urge cord) [i.bob cud]) + |=(cud=(urge cord) [i.bob cud]) %+ bind $(ali t.ali, p.i.bob (sub p.i.bob p.i.ali)) - |=(cud/(urge cord) [i.ali cud]) + |=(cud=(urge cord) [i.ali cud]) :: %| ?: =(p.i.ali (lent p.i.bob)) %+ bind $(ali t.ali, bob t.bob) - |=(cud/(urge cord) [i.bob cud]) + |=(cud=(urge cord) [i.bob cud]) ?: (gth p.i.ali (lent p.i.bob)) %+ bind $(p.i.ali (sub p.i.ali (lent p.i.bob)), bob t.bob) - |=(cud/(urge cord) [i.bob cud]) + |=(cud=(urge cord) [i.bob cud]) ~ == :: @@ -77,15 +77,15 @@ %& ?: =(p.i.bob (lent p.i.ali)) %+ bind $(ali t.ali, bob t.bob) - |=(cud/(urge cord) [i.ali cud]) + |=(cud=(urge cord) [i.ali cud]) ?: (gth p.i.bob (lent p.i.ali)) %+ bind $(ali t.ali, p.i.bob (sub p.i.bob (lent p.i.ali))) - |=(cud/(urge cord) [i.ali cud]) + |=(cud=(urge cord) [i.ali cud]) ~ == == ++ clean :: clean - |= wig/(urge cord) + |= wig=(urge cord) ^- (urge cord) ?~ wig ~ ?~ t.wig wig @@ -179,7 +179,7 @@ ~ :: ++ clean :: clean - |= wig/(urge cord) + |= wig=(urge cord) ^- (urge cord) ?~ wig ~ ?~ t.wig wig @@ -192,7 +192,7 @@ [i.wig $(wig t.wig)] :: ++ resolve - |= {ali/(urge cord) bob/(urge cord)} + |= [ali=(urge cord) bob=(urge cord)] ^- {fic/{%| p/(list cord) q/(list cord)} ali/(urge cord) bob/(urge cord)} =- [[%| bac (annotate alc boc bac)] ali bob] |- ^- $: $: bac/(list cord) diff --git a/pkg/arvo/mar/xml.hoon b/pkg/arvo/mar/xml.hoon index 01ac140fb..b9705e5a1 100644 --- a/pkg/arvo/mar/xml.hoon +++ b/pkg/arvo/mar/xml.hoon @@ -17,5 +17,5 @@ -- :: ++ grab |% :: convert from ++ noun @t :: clam from %noun - ++ mime |=({p/mite q/octs} q.q) :: retrieve form $mime + ++ mime |=([p=mite q=octs] q.q) :: retrieve form $mime -- --