From bc36487224f670c23002cc4575c0dba3e5dc1be1 Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Tue, 15 Mar 2022 07:24:35 -0400
Subject: De-sigil-ification: ^

---
 .../luxc/lang/translation/jvm/extension/host.lux   | 69 +++++++++++-----------
 1 file changed, 35 insertions(+), 34 deletions(-)

(limited to 'lux-jvm/source/luxc/lang/translation/jvm/extension')

diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
index ee6f243f2..0ea499e92 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
@@ -20,6 +20,7 @@
      ["[0]" dictionary {"+" Dictionary}]
      ["[0]" set {"+" Set}]]]
    [macro
+    ["^" pattern]
     ["[0]" template]]
    [math
     [number
@@ -389,7 +390,7 @@
   (-> (Type Primitive) Handler)
   (function (_ extension_name generate archive inputs)
     (case inputs
-      (^ (list lengthS))
+      (pattern (list lengthS))
       (do phase.monad
         [lengthI (generate archive lengthS)]
         (in (|>> lengthI
@@ -412,7 +413,7 @@
   (-> (Type Primitive) Inst Handler)
   (function (_ extension_name generate archive inputs)
     (case inputs
-      (^ (list idxS arrayS))
+      (pattern (list idxS arrayS))
       (do phase.monad
         [arrayI (generate archive arrayS)
          idxI (generate archive idxS)]
@@ -441,7 +442,7 @@
   (-> (Type Primitive) Inst Handler)
   (function (_ extension_name generate archive inputs)
     (case inputs
-      (^ (list idxS valueS arrayS))
+      (pattern (list idxS valueS arrayS))
       (do phase.monad
         [arrayI (generate archive arrayS)
          idxI (generate archive idxS)
@@ -558,7 +559,7 @@
 (def: (object::class extension_name generate archive inputs)
   Handler
   (case inputs
-    (^ (list (synthesis.text class)))
+    (pattern (list (synthesis.text class)))
     (do phase.monad
       []
       (in (|>> (_.string class)
@@ -581,7 +582,7 @@
 (def: (object::cast extension_name generate archive inputs)
   Handler
   (case inputs
-    (^ (list (synthesis.text from) (synthesis.text to) valueS))
+    (pattern (list (synthesis.text from) (synthesis.text to) valueS))
     (do phase.monad
       [valueI (generate archive valueS)]
       (`` (cond (~~ (template [<object> <primitive>]
@@ -835,14 +836,14 @@
     [_ {synthesis.#Control {synthesis.#Branch {synthesis.#Case _ path}}}]
     (loop [path (: synthesis.Path path)]
       (case path
-        (^or {synthesis.#Pop}
-             {synthesis.#Access _}
-             {synthesis.#Bind _}
-             {synthesis.#Bit_Fork _}
-             {synthesis.#I64_Fork _}
-             {synthesis.#F64_Fork _}
-             {synthesis.#Text_Fork _}
-             {synthesis.#Alt _})
+        (^.or {synthesis.#Pop}
+              {synthesis.#Access _}
+              {synthesis.#Bind _}
+              {synthesis.#Bit_Fork _}
+              {synthesis.#I64_Fork _}
+              {synthesis.#F64_Fork _}
+              {synthesis.#Text_Fork _}
+              {synthesis.#Alt _})
         body
         
         {synthesis.#Seq _ next}
@@ -884,17 +885,17 @@
       (-> Path Path))
   (function (again path)
     (case path
-      (^ (synthesis.path/then bodyS))
+      (pattern (synthesis.path/then bodyS))
       (synthesis.path/then (normalize bodyS))
 
-      (^template [<tag>]
-        [(^ {<tag> leftP rightP})
+      (^.template [<tag>]
+        [(pattern {<tag> leftP rightP})
          {<tag> (again leftP) (again rightP)}])
       ([synthesis.#Alt]
        [synthesis.#Seq])
 
-      (^template [<tag>]
-        [(^ {<tag> _})
+      (^.template [<tag>]
+        [(pattern {<tag> _})
          path])
       ([synthesis.#Pop]
        [synthesis.#Bind]
@@ -903,7 +904,7 @@
       {synthesis.#Bit_Fork when then else}
       {synthesis.#Bit_Fork when (again then) (maybe#each again else)}
 
-      (^template [<tag>]
+      (^.template [<tag>]
         [{<tag> [[test then] elses]}
          {<tag> [[test (again then)]
                  (list#each (function (_ [else_test else_then])
@@ -939,49 +940,49 @@
   (-> Mapping Synthesis Synthesis)
   (function (again body)
     (case body
-      (^template [<tag>]
-        [(^ <tag>)
+      (^.template [<tag>]
+        [(pattern <tag>)
          body])
       ([{synthesis.#Primitive _}]
        [(synthesis.constant _)])
 
-      (^ (synthesis.variant [lefts right? sub]))
+      (pattern (synthesis.variant [lefts right? sub]))
       (synthesis.variant [lefts right? (again sub)])
 
-      (^ (synthesis.tuple members))
+      (pattern (synthesis.tuple members))
       (synthesis.tuple (list#each again members))
 
-      (^ (synthesis.variable var))
+      (pattern (synthesis.variable var))
       (|> mapping
           (dictionary.value body)
           (maybe.else var)
           synthesis.variable)
 
-      (^ (synthesis.branch/case [inputS pathS]))
+      (pattern (synthesis.branch/case [inputS pathS]))
       (synthesis.branch/case [(again inputS) (normalize_path again pathS)])
 
-      (^ (synthesis.branch/exec [this that]))
+      (pattern (synthesis.branch/exec [this that]))
       (synthesis.branch/exec [(again this) (again that)])
 
-      (^ (synthesis.branch/let [inputS register outputS]))
+      (pattern (synthesis.branch/let [inputS register outputS]))
       (synthesis.branch/let [(again inputS) register (again outputS)])
 
-      (^ (synthesis.branch/if [testS thenS elseS]))
+      (pattern (synthesis.branch/if [testS thenS elseS]))
       (synthesis.branch/if [(again testS) (again thenS) (again elseS)])
 
-      (^ (synthesis.branch/get [path recordS]))
+      (pattern (synthesis.branch/get [path recordS]))
       (synthesis.branch/get [path (again recordS)])
 
-      (^ (synthesis.loop/scope [offset initsS+ bodyS]))
+      (pattern (synthesis.loop/scope [offset initsS+ bodyS]))
       (synthesis.loop/scope [offset (list#each again initsS+) (again bodyS)])
 
-      (^ (synthesis.loop/again updatesS+))
+      (pattern (synthesis.loop/again updatesS+))
       (synthesis.loop/again (list#each again updatesS+))
 
-      (^ (synthesis.function/abstraction [environment arity bodyS]))
+      (pattern (synthesis.function/abstraction [environment arity bodyS]))
       (synthesis.function/abstraction [(list#each (function (_ captured)
                                                     (case captured
-                                                      (^ (synthesis.variable var))
+                                                      (pattern (synthesis.variable var))
                                                       (|> mapping
                                                           (dictionary.value captured)
                                                           (maybe.else var)
@@ -993,7 +994,7 @@
                                        arity
                                        bodyS])
 
-      (^ (synthesis.function/apply [functionS inputsS+]))
+      (pattern (synthesis.function/apply [functionS inputsS+]))
       (synthesis.function/apply [(again functionS) (list#each again inputsS+)])
 
       {synthesis.#Extension [name inputsS+]}
-- 
cgit v1.2.3