aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/tool/compiler')
-rw-r--r--stdlib/source/lux/tool/compiler/analysis.lux22
-rw-r--r--stdlib/source/lux/tool/compiler/default/evaluation.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/default/init.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/default/platform.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/default/syntax.lux14
-rw-r--r--stdlib/source/lux/tool/compiler/meta/archive.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/meta/archive/signature.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/meta/io/archive.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/meta/io/context.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/meta/packager/script.lux1
-rw-r--r--stdlib/source/lux/tool/compiler/name.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/case.lux18
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux12
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/function.lux12
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/inference.lux24
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/module.lux10
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/reference.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/scope.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/structure.lux50
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension.lux16
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux34
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux8
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/bundle.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux22
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation.lux14
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/case.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/function.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/php/case.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/php/function.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/case.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/function.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/reference.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/macro.lux12
-rw-r--r--stdlib/source/lux/tool/compiler/phase/statement.lux8
-rw-r--r--stdlib/source/lux/tool/compiler/phase/synthesis/case.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/synthesis/function.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/reference.lux8
-rw-r--r--stdlib/source/lux/tool/compiler/statement.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/synthesis.lux42
64 files changed, 219 insertions, 245 deletions
diff --git a/stdlib/source/lux/tool/compiler/analysis.lux b/stdlib/source/lux/tool/compiler/analysis.lux
index 998306d4a..05bb2be01 100644
--- a/stdlib/source/lux/tool/compiler/analysis.lux
+++ b/stdlib/source/lux/tool/compiler/analysis.lux
@@ -10,7 +10,7 @@
["." error]
["." maybe]
["." text ("#@." equivalence)
- format]
+ ["%" format (#+ Format format)]]
[collection
["." list ("#@." functor fold)]]]]
[//
@@ -181,17 +181,17 @@
(^template [<tag> <format>]
(<tag> value)
(<format> value))
- ([#Bit %b]
- [#Nat %n]
- [#Int %i]
- [#Rev %r]
- [#Frac %f]
- [#Text %t]))
+ ([#Bit %.bit]
+ [#Nat %.nat]
+ [#Int %.int]
+ [#Rev %.rev]
+ [#Frac %.frac]
+ [#Text %.text]))
(#Structure structure)
(case structure
(#Variant [lefts right? value])
- (format "(" (%n lefts) " " (%b right?) " " (%analysis value) ")")
+ (format "(" (%.nat lefts) " " (%.bit right?) " " (%analysis value) ")")
(#Tuple members)
(|> members
@@ -205,7 +205,7 @@
(reference.%variable variable)
(#reference.Constant constant)
- (%name constant))
+ (%.name constant))
(#Case analysis match)
"{?}"
@@ -231,7 +231,7 @@
(|> parameters
(list@map %analysis)
(text.join-with " ")
- (format (%t name) " ")
+ (format (%.text name) " ")
(text.enclose ["(" ")"]))))
(template [<special> <general>]
@@ -307,7 +307,7 @@
(def: (locate-error cursor error)
(-> Cursor Text Text)
- (format "@ " (%cursor cursor) text.new-line
+ (format "@ " (%.cursor cursor) text.new-line
error))
(def: #export (fail error)
diff --git a/stdlib/source/lux/tool/compiler/default/evaluation.lux b/stdlib/source/lux/tool/compiler/default/evaluation.lux
index 55b20805f..72065a3c8 100644
--- a/stdlib/source/lux/tool/compiler/default/evaluation.lux
+++ b/stdlib/source/lux/tool/compiler/default/evaluation.lux
@@ -5,7 +5,7 @@
[data
["." error]
[text
- format]]]
+ ["%" format (#+ format)]]]]
[///
["." phase
[macro (#+ Expander)]
@@ -37,4 +37,4 @@
(phase.run generation-state
(do phase.monad
[exprO (generate exprS)]
- (generation.evaluate! (format "eval" (%n count)) exprO)))))))))
+ (generation.evaluate! (format "eval" (%.nat count)) exprO)))))))))
diff --git a/stdlib/source/lux/tool/compiler/default/init.lux b/stdlib/source/lux/tool/compiler/default/init.lux
index 1a8d10474..f59a171dd 100644
--- a/stdlib/source/lux/tool/compiler/default/init.lux
+++ b/stdlib/source/lux/tool/compiler/default/init.lux
@@ -7,8 +7,7 @@
[data
["." product]
["." error (#+ Error)]
- ["." text ("#@." hash)
- format]
+ ["." text ("#@." hash)]
[collection
["." list ("#@." functor)]
["." dictionary]
diff --git a/stdlib/source/lux/tool/compiler/default/platform.lux b/stdlib/source/lux/tool/compiler/default/platform.lux
index 3e086e813..ab24a52a7 100644
--- a/stdlib/source/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/lux/tool/compiler/default/platform.lux
@@ -8,7 +8,7 @@
["." product]
["." error (#+ Error)]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list]]]
[world
@@ -49,7 +49,7 @@
## (dictionary.entries outputs))]
## (&io.write target-dir
## (format module-name "/" cache.descriptor-name)
-## (encoding.to-utf8 (%code (cache/description.write file-name module))))))
+## (encoding.to-utf8 (%.code (cache/description.write file-name module))))))
(with-expansions [<type-vars> (as-is [! anchor expression statement])
<Platform> (as-is (Platform ! anchor expression statement))
diff --git a/stdlib/source/lux/tool/compiler/default/syntax.lux b/stdlib/source/lux/tool/compiler/default/syntax.lux
index e37ade4f9..d9a82695b 100644
--- a/stdlib/source/lux/tool/compiler/default/syntax.lux
+++ b/stdlib/source/lux/tool/compiler/default/syntax.lux
@@ -41,7 +41,7 @@
["." rev]
["." frac]]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list]
["." dictionary (#+ Dictionary)]]]
@@ -129,7 +129,7 @@
(exception: #export (end-of-file {module Text})
(exception.report
- ["Module" (%t module)]))
+ ["Module" (%.text module)]))
(def: amount-of-input-shown 64)
@@ -141,18 +141,18 @@
(exception: #export (unrecognized-input {[file line column] Cursor} {context Text} {input Text} {offset Offset})
(exception.report
["File" file]
- ["Line" (%n line)]
- ["Column" (%n column)]
- ["Context" (%t context)]
+ ["Line" (%.nat line)]
+ ["Column" (%.nat column)]
+ ["Context" (%.text context)]
["Input" (input-at offset input)]))
(exception: #export (text-cannot-contain-new-lines {text Text})
(exception.report
- ["Text" (%t text)]))
+ ["Text" (%.text text)]))
(template: (!failure parser where offset source-code)
(#.Left [[where offset source-code]
- (exception.construct unrecognized-input [where (%name (name-of parser)) source-code offset])]))
+ (exception.construct unrecognized-input [where (%.name (name-of parser)) source-code offset])]))
(template: (!end-of-file where offset source-code current-module)
(#.Left [[where offset source-code]
diff --git a/stdlib/source/lux/tool/compiler/meta/archive.lux b/stdlib/source/lux/tool/compiler/meta/archive.lux
index 46a6ce0a6..9953a7b2f 100644
--- a/stdlib/source/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/lux/tool/compiler/meta/archive.lux
@@ -8,8 +8,7 @@
[data
["." error (#+ Error)]
["." name]
- ["." text
- format]
+ ["." text]
[collection
["." dictionary (#+ Dictionary)]]]
[type
diff --git a/stdlib/source/lux/tool/compiler/meta/archive/signature.lux b/stdlib/source/lux/tool/compiler/meta/archive/signature.lux
index 7c9f0cbe2..c9e1818fd 100644
--- a/stdlib/source/lux/tool/compiler/meta/archive/signature.lux
+++ b/stdlib/source/lux/tool/compiler/meta/archive/signature.lux
@@ -5,7 +5,7 @@
[data
["." name]
["." text
- format]]]
+ ["%" format (#+ format)]]]]
[////
[default (#+ Version)]])
@@ -19,4 +19,4 @@
(def: #export (description signature)
(-> Signature Text)
- (format (%name (get@ #name signature)) " " (get@ #version signature)))
+ (format (%.name (get@ #name signature)) " " (get@ #version signature)))
diff --git a/stdlib/source/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/lux/tool/compiler/meta/io/archive.lux
index f9b01a682..bad568cb6 100644
--- a/stdlib/source/lux/tool/compiler/meta/io/archive.lux
+++ b/stdlib/source/lux/tool/compiler/meta/io/archive.lux
@@ -6,7 +6,7 @@
[data
["." error]
["." text
- format]]
+ ["%" format (#+ format)]]]
[world
["." file (#+ File System)]
[binary (#+ Binary)]]]
diff --git a/stdlib/source/lux/tool/compiler/meta/io/context.lux b/stdlib/source/lux/tool/compiler/meta/io/context.lux
index 454487cce..7ee9c063d 100644
--- a/stdlib/source/lux/tool/compiler/meta/io/context.lux
+++ b/stdlib/source/lux/tool/compiler/meta/io/context.lux
@@ -10,7 +10,7 @@
[data
["." error (#+ Error)]
["." text ("#;." hash)
- format
+ ["%" format (#+ format)]
["." encoding]]]
[world
["." file (#+ Path File)]
diff --git a/stdlib/source/lux/tool/compiler/meta/packager/script.lux b/stdlib/source/lux/tool/compiler/meta/packager/script.lux
index 2b93fc311..5693b59be 100644
--- a/stdlib/source/lux/tool/compiler/meta/packager/script.lux
+++ b/stdlib/source/lux/tool/compiler/meta/packager/script.lux
@@ -5,7 +5,6 @@
[data
["." product]
["." text
- format
["." encoding]]
[collection
["." row]
diff --git a/stdlib/source/lux/tool/compiler/name.lux b/stdlib/source/lux/tool/compiler/name.lux
index 093d934cb..16a8d4786 100644
--- a/stdlib/source/lux/tool/compiler/name.lux
+++ b/stdlib/source/lux/tool/compiler/name.lux
@@ -3,7 +3,7 @@
[data
["." maybe]
["." text
- format]]])
+ ["%" format (#+ format)]]]])
(`` (template: (!sanitize char)
("lux syntax char case!" char
diff --git a/stdlib/source/lux/tool/compiler/phase.lux b/stdlib/source/lux/tool/compiler/phase.lux
index 6137e9fd6..7107ac9da 100644
--- a/stdlib/source/lux/tool/compiler/phase.lux
+++ b/stdlib/source/lux/tool/compiler/phase.lux
@@ -12,7 +12,7 @@
["." product]
["." error (#+ Error) ("#@." functor)]
["." text
- format]]
+ ["%" format (#+ format)]]]
[time
["." instant]
["." duration]]
@@ -108,6 +108,6 @@
io.run
instant.relative
(duration.difference (instant.relative pre))
- %duration
- (format (%name definition) " [" description "]: ")))]]
+ %.duration
+ (format (%.name definition) " [" description "]: ")))]]
(wrap output)))
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis.lux b/stdlib/source/lux/tool/compiler/phase/analysis.lux
index dd21c8a1e..9281046c1 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis.lux
@@ -7,7 +7,7 @@
[data
["." error]
[text
- format]]
+ ["%" format (#+ format)]]]
["." macro]]
["." / #_
["#." type]
@@ -24,7 +24,7 @@
["/" analysis (#+ Analysis Operation Phase)]]]])
(exception: #export (unrecognized-syntax {code Code})
- (ex.report ["Code" (%code code)]))
+ (ex.report ["Code" (%.code code)]))
## TODO: Had to split the 'compile' function due to compilation issues
## with old-luxc. Must re-combine all the code ASAP
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/case.lux b/stdlib/source/lux/tool/compiler/phase/analysis/case.lux
index 4846b8f54..85be37a90 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/case.lux
@@ -9,7 +9,7 @@
["." error]
["." maybe]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." fold monoid functor)]]]
["." type
@@ -28,22 +28,22 @@
["#." coverage (#+ Coverage)]])
(exception: #export (cannot-match-with-pattern {type Type} {pattern Code})
- (ex.report ["Type" (%type type)]
- ["Pattern" (%code pattern)]))
+ (ex.report ["Type" (%.type type)]
+ ["Pattern" (%.code pattern)]))
(exception: #export (sum-has-no-case {case Nat} {type Type})
- (ex.report ["Case" (%n case)]
- ["Type" (%type type)]))
+ (ex.report ["Case" (%.nat case)]
+ ["Type" (%.type type)]))
(exception: #export (not-a-pattern {code Code})
- (ex.report ["Code" (%code code)]))
+ (ex.report ["Code" (%.code code)]))
(exception: #export (cannot-simplify-for-pattern-matching {type Type})
- (ex.report ["Type" (%type type)]))
+ (ex.report ["Type" (%.type type)]))
(exception: #export (non-exhaustive-pattern-matching {input Code} {branches (List [Code Code])} {coverage Coverage})
- (ex.report ["Input" (%code input)]
- ["Branches" (%code (code.record branches))]
+ (ex.report ["Input" (%.code input)]
+ ["Branches" (%.code (code.record branches))]
["Coverage" (/coverage.%coverage coverage)]))
(exception: #export (cannot-have-empty-branches {message Text})
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux b/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux
index 3444a5355..067ce0972 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux
@@ -12,7 +12,7 @@
[number
["." nat]]
["." text
- format]
+ ["%" format (#+ Format format)]]
[collection
["." list ("#@." functor fold)]
["." dictionary (#+ Dictionary)]]]]
@@ -68,17 +68,17 @@
(#Bit value')
(|> value'
- %b
+ %.bit
(text.enclose ["(#Bit " ")"]))
(#Variant ?max-cases cases)
(|> cases
dictionary.entries
(list@map (function (_ [idx coverage])
- (format (%n idx) " " (%coverage coverage))))
+ (format (%.nat idx) " " (%coverage coverage))))
(text.join-with " ")
(text.enclose ["{" "}"])
- (format (%n (..cases ?max-cases)) " ")
+ (format (%.nat (..cases ?max-cases)) " ")
(text.enclose ["(#Variant " ")"]))
(#Seq left right)
@@ -206,8 +206,8 @@
(open: "coverage/." ..equivalence)
(exception: #export (variants-do-not-match {addition-cases Nat} {so-far-cases Nat})
- (ex.report ["So-far Cases" (%n so-far-cases)]
- ["Addition Cases" (%n addition-cases)]))
+ (ex.report ["So-far Cases" (%.nat so-far-cases)]
+ ["Addition Cases" (%.nat addition-cases)]))
## After determining the coverage of each individual pattern, it is
## necessary to merge them all to figure out if the entire
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/function.lux b/stdlib/source/lux/tool/compiler/phase/analysis/function.lux
index 76effa0dc..5e5e26b85 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/function.lux
@@ -7,7 +7,7 @@
[data
["." maybe]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." fold monoid monad)]]]
["." type
@@ -23,18 +23,18 @@
["/" analysis (#+ Analysis Operation Phase)]]]])
(exception: #export (cannot-analyse {expected Type} {function Text} {argument Text} {body Code})
- (ex.report ["Type" (%type expected)]
+ (ex.report ["Type" (%.type expected)]
["Function" function]
["Argument" argument]
- ["Body" (%code body)]))
+ ["Body" (%.code body)]))
(exception: #export (cannot-apply {functionT Type} {functionC Code} {arguments (List Code)})
- (ex.report ["Function type" (%type functionT)]
- ["Function" (%code functionC)]
+ (ex.report ["Function type" (%.type functionT)]
+ ["Function" (%.code functionC)]
["Arguments" (|> arguments
list.enumerate
(list@map (.function (_ [idx argC])
- (format (%n idx) " " (%code argC))))
+ (format (%.nat idx) " " (%.code argC))))
(text.join-with text.new-line))]))
(def: #export (function analyse function-name arg-name body)
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux b/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux
index 7ef29752e..701e01167 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux
@@ -7,7 +7,7 @@
[data
["." maybe]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
["." type
@@ -21,29 +21,29 @@
["/" analysis (#+ Tag Analysis Operation Phase)]]]])
(exception: #export (variant-tag-out-of-bounds {size Nat} {tag Tag} {type Type})
- (ex.report ["Tag" (%n tag)]
- ["Variant size" (%i (.int size))]
- ["Variant type" (%type type)]))
+ (ex.report ["Tag" (%.nat tag)]
+ ["Variant size" (%.int (.int size))]
+ ["Variant type" (%.type type)]))
(exception: #export (cannot-infer {type Type} {args (List Code)})
- (ex.report ["Type" (%type type)]
+ (ex.report ["Type" (%.type type)]
["Arguments" (|> args
list.enumerate
(list@map (function (_ [idx argC])
- (format text.new-line " " (%n idx) " " (%code argC))))
+ (format text.new-line " " (%.nat idx) " " (%.code argC))))
(text.join-with ""))]))
(exception: #export (cannot-infer-argument {inferred Type} {argument Code})
- (ex.report ["Inferred Type" (%type inferred)]
- ["Argument" (%code argument)]))
+ (ex.report ["Inferred Type" (%.type inferred)]
+ ["Argument" (%.code argument)]))
(exception: #export (smaller-variant-than-expected {expected Nat} {actual Nat})
- (ex.report ["Expected" (%i (.int expected))]
- ["Actual" (%i (.int actual))]))
+ (ex.report ["Expected" (%.int (.int expected))]
+ ["Actual" (%.int (.int actual))]))
(template [<name>]
[(exception: #export (<name> {type Type})
- (%type type))]
+ (%.type type))]
[not-a-variant-type]
[not-a-record-type]
@@ -82,7 +82,7 @@
(def: (named-type cursor id)
(-> Cursor Nat Type)
- (let [name (format "{New Type @ " (.cursor-description cursor) " " (%n id) "}")]
+ (let [name (format "{New Type @ " (.cursor-description cursor) " " (%.nat id) "}")]
(#.Primitive name (list))))
(def: new-named-type
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/module.lux b/stdlib/source/lux/tool/compiler/phase/analysis/module.lux
index 6a33171f1..c6280e4b3 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/module.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/module.lux
@@ -7,7 +7,7 @@
["ex" exception (#+ exception:)]]
[data
["." text ("#@." equivalence)
- format]
+ ["%" format (#+ format)]]
["." error]
[collection
["." list ("#@." fold functor)]
@@ -31,14 +31,14 @@
(template [<name>]
[(exception: #export (<name> {tags (List Text)} {owner Type})
(ex.report ["Tags" (text.join-with " " tags)]
- ["Type" (%type owner)]))]
+ ["Type" (%.type owner)]))]
[cannot-declare-tags-for-unnamed-type]
[cannot-declare-tags-for-foreign-type]
)
(exception: #export (cannot-define-more-than-once {name Name})
- (ex.report ["Definition" (%name name)]))
+ (ex.report ["Definition" (%.name name)]))
(exception: #export (can-only-change-state-of-active-module {module Text} {state Module-State})
(ex.report ["Module" module]
@@ -49,8 +49,8 @@
(exception: #export (cannot-set-module-annotations-more-than-once {module Text} {old Code} {new Code})
(ex.report ["Module" module]
- ["Old annotations" (%code old)]
- ["New annotations" (%code new)]))
+ ["Old annotations" (%.code old)]
+ ["New annotations" (%.code new)]))
(def: #export (new hash)
(-> Nat Module)
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux b/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux
index c09ea55ba..6a5c4f889 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux
@@ -7,7 +7,7 @@
["." macro]
[data
["." text ("#@." equivalence)
- format]]]
+ ["%" format (#+ format)]]]]
["." // #_
["#." scope]
["#." type]
@@ -24,7 +24,7 @@
(exception: #export (definition-has-not-been-exported {definition Name})
(exception.report
- ["Definition" (%name definition)]))
+ ["Definition" (%.name definition)]))
(def: (definition def-name)
(-> Name (Operation Analysis))
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux b/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux
index abf8f2a04..104001da9 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux
@@ -5,8 +5,7 @@
[control
["ex" exception (#+ exception:)]]
[data
- ["." text ("#;." equivalence)
- format]
+ ["." text ("#;." equivalence)]
["." maybe ("#;." monad)]
["." product]
["e" error]
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux
index aebbe75ba..a630a8fab 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux
@@ -13,7 +13,7 @@
[number
["." nat]]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]
["." dictionary (#+ Dictionary)]]]
@@ -31,58 +31,58 @@
["/" analysis (#+ Tag Analysis Operation Phase)]]]])
(exception: #export (invalid-variant-type {type Type} {tag Tag} {code Code})
- (ex.report ["Type" (%type type)]
- ["Tag" (%n tag)]
- ["Expression" (%code code)]))
+ (ex.report ["Type" (%.type type)]
+ ["Tag" (%.nat tag)]
+ ["Expression" (%.code code)]))
(template [<name>]
[(exception: #export (<name> {type Type} {members (List Code)})
- (ex.report ["Type" (%type type)]
- ["Expression" (%code (` [(~+ members)]))]))]
+ (ex.report ["Type" (%.type type)]
+ ["Expression" (%.code (` [(~+ members)]))]))]
[invalid-tuple-type]
[cannot-analyse-tuple]
)
(exception: #export (not-a-quantified-type {type Type})
- (%type type))
+ (%.type type))
(template [<name>]
[(exception: #export (<name> {type Type} {tag Tag} {code Code})
- (ex.report ["Type" (%type type)]
- ["Tag" (%n tag)]
- ["Expression" (%code code)]))]
+ (ex.report ["Type" (%.type type)]
+ ["Tag" (%.nat tag)]
+ ["Expression" (%.code code)]))]
[cannot-analyse-variant]
[cannot-infer-numeric-tag]
)
(exception: #export (record-keys-must-be-tags {key Code} {record (List [Code Code])})
- (ex.report ["Key" (%code key)]
- ["Record" (%code (code.record record))]))
+ (ex.report ["Key" (%.code key)]
+ ["Record" (%.code (code.record record))]))
(template [<name>]
[(exception: #export (<name> {key Name} {record (List [Name Code])})
- (ex.report ["Tag" (%code (code.tag key))]
- ["Record" (%code (code.record (list@map (function (_ [keyI valC])
- [(code.tag keyI) valC])
- record)))]))]
+ (ex.report ["Tag" (%.code (code.tag key))]
+ ["Record" (%.code (code.record (list@map (function (_ [keyI valC])
+ [(code.tag keyI) valC])
+ record)))]))]
[cannot-repeat-tag]
)
(exception: #export (tag-does-not-belong-to-record {key Name} {type Type})
- (ex.report ["Tag" (%code (code.tag key))]
- ["Type" (%type type)]))
+ (ex.report ["Tag" (%.code (code.tag key))]
+ ["Type" (%.type type)]))
(exception: #export (record-size-mismatch {expected Nat} {actual Nat} {type Type} {record (List [Name Code])})
- (ex.report ["Expected" (|> expected .int %i)]
- ["Actual" (|> actual .int %i)]
- ["Type" (%type type)]
- ["Expression" (%code (|> record
- (list@map (function (_ [keyI valueC])
- [(code.tag keyI) valueC]))
- code.record))]))
+ (ex.report ["Expected" (%.nat expected)]
+ ["Actual" (%.nat actual)]
+ ["Type" (%.type type)]
+ ["Expression" (%.code (|> record
+ (list@map (function (_ [keyI valueC])
+ [(code.tag keyI) valueC]))
+ code.record))]))
(def: #export (sum analyse tag valueC)
(-> Phase Nat Code (Operation Analysis))
diff --git a/stdlib/source/lux/tool/compiler/phase/extension.lux b/stdlib/source/lux/tool/compiler/phase/extension.lux
index 9d9563eba..4b00c946f 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension.lux
@@ -8,7 +8,7 @@
[data
["." error (#+ Error)]
["." text ("#@." order)
- format]
+ ["%" format (#+ Format format)]]
[collection
["." list ("#@." functor)]
["." dictionary (#+ Dictionary)]]]]
@@ -40,26 +40,26 @@
(exception: #export (cannot-overwrite {name Name})
(exception.report
- ["Extension" (%t name)]))
+ ["Extension" (%.text name)]))
(exception: #export (incorrect-arity {name Name} {arity Nat} {args Nat})
(exception.report
- ["Extension" (%t name)]
- ["Expected" (%n arity)]
- ["Actual" (%n args)]))
+ ["Extension" (%.text name)]
+ ["Expected" (%.nat arity)]
+ ["Actual" (%.nat args)]))
(exception: #export [a] (invalid-syntax {name Name} {%format (Format a)} {inputs (List a)})
(exception.report
- ["Extension" (%t name)]
+ ["Extension" (%.text name)]
["Inputs" (exception.enumerate %format inputs)]))
(exception: #export [s i o] (unknown {name Name} {bundle (Bundle s i o)})
(exception.report
- ["Extension" (%t name)]
+ ["Extension" (%.text name)]
["Available" (|> bundle
dictionary.keys
(list.sort text@<)
- (exception.enumerate %t))]))
+ (exception.enumerate %.text))]))
(def: #export (install name handler)
(All [s i o]
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux
index 94aec9628..fa31254c8 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux
@@ -15,7 +15,7 @@
["." maybe]
["." product]
["." text ("#@." equivalence)
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." fold monad monoid)]
["." array (#+ Array)]
@@ -92,7 +92,7 @@
(template [<name>]
[(exception: #export (<name> {type .Type})
(exception.report
- ["Type" (%type type)]))]
+ ["Type" (%.type type)]))]
[non-object]
[non-array]
@@ -101,7 +101,7 @@
(template [<name>]
[(exception: #export (<name> {class Text})
(exception.report
- ["Class/type" (%t class)]))]
+ ["Class/type" (%.text class)]))]
[non-interface]
[non-throwable]
@@ -110,8 +110,8 @@
(exception: #export (cannot-set-a-final-field {field Text} {class Text})
(exception.report
- ["Field" (%t field)]
- ["Class" (%t class)]))
+ ["Field" (%.text field)]
+ ["Class" (%.text class)]))
(template [<name>]
[(exception: #export (<name> {class Text}
@@ -121,8 +121,8 @@
(exception.report
["Class" class]
["Method" method]
- ["Arguments" (exception.enumerate %t arg-classes)]
- ["Hints" (exception.enumerate %type (list@map product.left hints))]))]
+ ["Arguments" (exception.enumerate %.text arg-classes)]
+ ["Hints" (exception.enumerate %.type (list@map product.left hints))]))]
[no-candidates]
[too-many-candidates]
@@ -130,9 +130,9 @@
(exception: #export (cannot-cast {from .Type} {to .Type} {value Code})
(exception.report
- ["From" (%type from)]
- ["To" (%type to)]
- ["Value" (%code value)]))
+ ["From" (%.type from)]
+ ["To" (%.type to)]
+ ["Value" (%.code value)]))
(template [<name>]
[(exception: #export (<name> {message Text})
@@ -627,7 +627,7 @@
(wrap (#/////analysis.Extension extension-name (list (/////analysis.text class)))))
_
- (/////analysis.throw ///.invalid-syntax [extension-name %code args]))
+ (/////analysis.throw ///.invalid-syntax [extension-name %.code args]))
_
(/////analysis.throw ///.incorrect-arity [extension-name 1 (list.size args)]))))
@@ -807,7 +807,7 @@
(/////analysis.throw cannot-cast [fromT toT fromC])))
_
- (/////analysis.throw ///.invalid-syntax [extension-name %code args]))))
+ (/////analysis.throw ///.invalid-syntax [extension-name %.code args]))))
(def: bundle::object
Bundle
@@ -1443,7 +1443,7 @@
(exception.report
["Methods" (exception.enumerate
(function (_ [name method])
- (format (%t name) " " (jvm.method-signature method)))
+ (format (%.text name) " " (jvm.method-signature method)))
methods)]))]
[missing-abstract-methods]
@@ -1837,9 +1837,9 @@
(exception: #export (class-parameter-mismatch {expected (List Text)}
{actual (List jvm.Generic)})
(exception.report
- ["Expected (amount)" (%n (list.size expected))]
- ["Expected (parameters)" (exception.enumerate %t expected)]
- ["Actual (amount)" (%n (list.size actual))]
+ ["Expected (amount)" (%.nat (list.size expected))]
+ ["Expected (parameters)" (exception.enumerate %.text expected)]
+ ["Actual (amount)" (%.nat (list.size actual))]
["Actual (parameters)" (exception.enumerate (|>> #jvm.Generic jvm.signature) actual)]))
(type: Renamer (Dictionary Text Text))
@@ -1934,7 +1934,7 @@
id macro.count]
(wrap (format (text.replace-all .module-separator ..jvm-package-separator where)
..jvm-package-separator
- "anonymous-class" (%n id)))))
+ "anonymous-class" (%.nat id)))))
super-classT (typeA.with-env
(luxT.class mapping super-class))
super-interfaceT+ (typeA.with-env
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux
index 48401f0c6..2086a0fea 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux
@@ -11,7 +11,7 @@
["." maybe]
["." error]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]
["." dictionary (#+ Dictionary)]]]
@@ -41,7 +41,7 @@
(handler extension-name analyse inputs)
(#error.Failure error)
- (/////analysis.throw ///.invalid-syntax [extension-name %code args]))))
+ (/////analysis.throw ///.invalid-syntax [extension-name %.code args]))))
(def: (simple inputsT+ outputT)
(-> (List Type) Type Handler)
@@ -79,7 +79,7 @@
(as-is
(exception: #export (char-text-must-be-size-1 {text Text})
(exception.report
- ["Text" (%t text)]))
+ ["Text" (%.text text)]))
(def: text-char
(Parser text.Char)
@@ -152,7 +152,7 @@
(analyse exprC))
_
- (/////analysis.throw ///.invalid-syntax [extension-name %code argsC+]))))
+ (/////analysis.throw ///.invalid-syntax [extension-name %.code argsC+]))))
(def: (lux::check eval)
(-> Eval Handler)
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux b/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux
index 28015b956..4816993f3 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux
@@ -4,7 +4,7 @@
[monad (#+ do)]]
[data
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#;." functor)]
["." dictionary (#+ Dictionary)]]]]
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux
index af49f8ee1..e4cf0140e 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux
@@ -12,7 +12,7 @@
["." maybe]
["." error]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#;." functor)]
["." dictionary]]]
@@ -50,7 +50,7 @@
(handler extension-name phase inputs)
(#error.Failure error)
- (////.throw ///.invalid-syntax [extension-name %code inputs]))))
+ (////.throw ///.invalid-syntax [extension-name %.code inputs]))))
## TODO: Inline "evaluate!'" into "evaluate!" ASAP
(def: (evaluate!' generate code//type codeS)
@@ -63,7 +63,7 @@
(do ////.monad
[codeT (generate codeS)
count ////generation.next
- codeV (////generation.evaluate! (format "evaluate" (%n count)) codeT)]
+ codeV (////generation.evaluate! (format "evaluate" (%.nat count)) codeT)]
(wrap [code//type codeT codeV]))))
(def: (evaluate! type codeC)
@@ -157,14 +157,14 @@
[type valueT valueN value] (..definition full-name #.None valueC)
_ (/////statement.lift-analysis
(module.define short-name (#.Right [exported? type annotations value])))
- #let [_ (log! (format "Definition " (%name full-name)))]
+ #let [_ (log! (format "Definition " (%.name full-name)))]
_ (/////statement.lift-generation
(////generation.learn full-name valueN))
_ (..refresh expander host-analysis)]
(wrap /////statement.no-requirements))
_
- (////.throw ///.invalid-syntax [extension-name %code inputsC+]))))
+ (////.throw ///.invalid-syntax [extension-name %.code inputsC+]))))
(def: (def::type-tagged expander host-analysis)
(-> Expander /////analysis.Bundle Handler)
@@ -182,7 +182,7 @@
(do ////.monad
[_ (module.define short-name (#.Right [exported? type annotations value]))]
(module.declare-tags tags exported? (:coerce Type value))))
- #let [_ (log! (format "Definition " (%name full-name)))]
+ #let [_ (log! (format "Definition " (%.name full-name)))]
_ (/////statement.lift-generation
(////generation.learn full-name valueN))
_ (..refresh expander host-analysis)]
@@ -217,9 +217,9 @@
(exception: #export (cannot-alias-an-alias {local Alias} {foreign Alias} {target Name})
(exception.report
- ["Local alias" (%name local)]
- ["Foreign alias" (%name foreign)]
- ["Target definition" (%name target)]))
+ ["Local alias" (%.name local)]
+ ["Foreign alias" (%.name foreign)]
+ ["Target definition" (%.name target)]))
(def: (define-alias alias original)
(-> Text Name (/////analysis.Operation Any))
@@ -268,7 +268,7 @@
(wrap /////statement.no-requirements))
_
- (////.throw ///.invalid-syntax [extension-name %code inputsC+]))))]
+ (////.throw ///.invalid-syntax [extension-name %.code inputsC+]))))]
[def::analysis /////analysis.Handler /////statement.lift-analysis]
[def::synthesis /////synthesis.Handler /////statement.lift-synthesis]
@@ -321,7 +321,7 @@
(wrap /////statement.no-requirements))
_
- (////.throw ///.invalid-syntax [extension-name %code inputsC+]))))
+ (////.throw ///.invalid-syntax [extension-name %.code inputsC+]))))
(def: (bundle::def expander host-analysis program)
(All [anchor expression statement]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation.lux b/stdlib/source/lux/tool/compiler/phase/generation.lux
index 4482daa3b..93dc97518 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation.lux
@@ -9,7 +9,7 @@
["." error (#+ Error)]
["." name ("#@." equivalence)]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." row (#+ Row)]
["." dictionary (#+ Dictionary)]
@@ -31,25 +31,25 @@
(exception: #export (unknown-lux-name {name Name} {registry Registry})
(exception.report
- ["Name" (%name name)]
+ ["Name" (%.name name)]
["Registry" (|> registry
dictionary.keys
(list.sort (:: name.order <))
- (list@map %name)
+ (list@map %.name)
(text.join-with text.new-line))]))
(exception: #export (cannot-overwrite-lux-name {lux-name Name}
{old-host-name Text}
{new-host-name Text})
(exception.report
- ["Lux Name" (%name lux-name)]
+ ["Lux Name" (%.name lux-name)]
["Old Host Name" old-host-name]
["New Host Name" new-host-name]))
(template [<name>]
[(exception: #export (<name> {name Name})
(exception.report
- ["Output" (%name name)]))]
+ ["Output" (%.name name)]))]
[cannot-overwrite-output]
[no-buffer-for-saving-code]
@@ -109,7 +109,7 @@
(Operation anchor expression statement [Text output])))
(function (_ [bundle state])
(let [[old-scope old-inner] (get@ #context state)
- new-scope (format old-scope "c" (%n old-inner))]
+ new-scope (format old-scope "c" (%.nat old-inner))]
(case (expr [bundle (set@ #context [new-scope 0] state)])
(#error.Success [[bundle' state'] output])
(#error.Success [[bundle' (set@ #context [old-scope (inc old-inner)] state')]
@@ -192,7 +192,7 @@
(def: #export (gensym prefix)
(All [anchor expression statement]
(-> Text (Operation anchor expression statement Text)))
- (:: //.monad map (|>> %n (format prefix)) ..next))
+ (:: //.monad map (|>> %.nat (format prefix)) ..next))
(template [<name> <inputT>]
[(def: #export (<name> label code)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux
index 6f24f6c23..6b782a24d 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux
@@ -5,8 +5,7 @@
[control
["ex" exception (#+ exception:)]]
[data
- ["." text
- format]
+ ["." text]
[collection
["." list ("#@." functor fold)]
["." set]]]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux
index d32f1b772..c8edd4e46 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux
@@ -6,8 +6,6 @@
pipe]
[data
["." product]
- [text
- format]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux
index 29326e358..13e049e1d 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux
@@ -5,7 +5,7 @@
[data
["." product]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
[target
@@ -21,7 +21,7 @@
(def: #export (scope generate [start initsS+ bodyS])
(-> Phase (Scope Synthesis) (Operation (Expression Any)))
(do ////.monad
- [@scope (:: @ map (|>> %n (format "scope") _.var) ///.next)
+ [@scope (:: @ map (|>> %.nat (format "scope") _.var) ///.next)
initsG+ (monad.map @ generate initsS+)
bodyG (///.with-anchor @scope
(generate bodyS))]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux
index 65c355ecf..19594bac9 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux
@@ -10,7 +10,7 @@
[number (#+ hex)
["." i64]]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
["." macro
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux
index 3a5e8f2d3..f17b2b983 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux
@@ -5,8 +5,7 @@
[control
["ex" exception (#+ exception:)]]
[data
- ["." text
- format]
+ ["." text]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux
index e43e71fe4..a0418b839 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux
@@ -6,8 +6,6 @@
pipe]
[data
["." product]
- [text
- format]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux
index fd2d3de58..65e691c51 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux
@@ -4,8 +4,7 @@
["." monad (#+ do)]]
[data
["." product]
- ["." text
- format]
+ ["." text]
[collection
["." list ("#@." functor)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux
index 6bd6565dd..949e663c7 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux
@@ -10,7 +10,7 @@
[number (#+ hex)
["." i64]]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#;." functor)]]]
["." macro
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux
index d69668611..c74ceb8c7 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux
@@ -5,8 +5,7 @@
[control
["ex" exception (#+ exception:)]]
[data
- ["." text
- format]
+ ["." text]
[collection
["." list ("#@." functor fold)]
["." set]]]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux
index 325ac58a6..eb0a5e71b 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux
@@ -6,8 +6,6 @@
pipe]
[data
["." product]
- [text
- format]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux
index 49180db8b..b575ec97b 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux
@@ -5,7 +5,7 @@
[data
["." product]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
[target
@@ -21,7 +21,7 @@
(def: #export (scope generate [start initsS+ bodyS])
(-> Phase (Scope Synthesis) (Operation (Expression Any)))
(do ////.monad
- [@loop (:: @ map (|>> %n (format "loop") _.var) ///.next)
+ [@loop (:: @ map (|>> %.nat (format "loop") _.var) ///.next)
initsO+ (monad.map @ generate initsS+)
bodyO (///.with-anchor @loop
(generate bodyS))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux
index e5ce5a201..47e58fc57 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux
@@ -10,7 +10,7 @@
[number (#+ hex)
["." i64]]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
["." macro
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux
index 4bd86c94e..abd31b7f2 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux
@@ -7,7 +7,7 @@
[data
["." product]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor fold)]
["." set]]]
@@ -209,7 +209,7 @@
(def: (gensym prefix)
(-> Text (Operation Text))
- (:: ////.monad map (|>> %n (format prefix)) ///.next))
+ (:: ////.monad map (|>> %.nat (format prefix)) ///.next))
(def: #export (case generate [valueS pathP])
(-> Phase [Synthesis Path] (Operation (Expression Any)))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux
index 5cbf855b6..8dfb9668e 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux
@@ -6,8 +6,7 @@
pipe]
[data
["." product]
- ["." text
- format]
+ ["." text]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux
index 94857fe4f..75cdedae3 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux
@@ -5,7 +5,7 @@
[data
["." product]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
[target
@@ -21,7 +21,7 @@
(def: #export (scope generate [start initsS+ bodyS])
(-> Phase (Scope Synthesis) (Operation (Expression Any)))
(do ////.monad
- [@loop (:: @ map (|>> %n (format "loop")) ///.next)
+ [@loop (:: @ map (|>> %.nat (format "loop")) ///.next)
#let [@loopG (_.global @loop)
@loopL (_.var @loop)]
initsO+ (monad.map @ generate initsS+)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux
index 4af1c01ac..3adf01716 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux
@@ -10,7 +10,7 @@
[number (#+ hex)
["." i64]]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
["." macro
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux
index d0f887385..80a142b37 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux
@@ -6,7 +6,7 @@
["ex" exception (#+ exception:)]]
[data
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor fold)]
["." set]]]
@@ -206,7 +206,7 @@
(def: (gensym prefix)
(-> Text (Operation SVar))
- (:: ////.monad map (|>> %n (format prefix) _.var) ///.next))
+ (:: ////.monad map (|>> %.nat (format prefix) _.var) ///.next))
(def: #export (case generate [valueS pathP])
(-> Phase [Synthesis Path] (Operation (Expression Any)))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux
index 0cbcdde37..c70ca9c37 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux
@@ -6,8 +6,6 @@
pipe]
[data
["." product]
- [text
- format]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux
index a58f02141..f0d75ef29 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux
@@ -5,7 +5,7 @@
[data
["." product]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
[target
@@ -21,7 +21,7 @@
(def: #export (scope generate [start initsS+ bodyS])
(-> Phase (Scope Synthesis) (Operation (Expression Any)))
(do ////.monad
- [@loop (:: @ map (|>> %n (format "loop") _.var) ///.next)
+ [@loop (:: @ map (|>> %.nat (format "loop") _.var) ///.next)
initsO+ (monad.map @ generate initsS+)
bodyO (///.with-anchor @loop
(generate bodyS))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
index 3fd58ef1b..5524980f6 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
@@ -10,7 +10,7 @@
[number (#+ hex)
["." i64]]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
["." macro
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/reference.lux b/stdlib/source/lux/tool/compiler/phase/generation/reference.lux
index 534d58cb1..110d78d0d 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/reference.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/reference.lux
@@ -4,7 +4,7 @@
pipe]
[data
[text
- format]]
+ ["%" format (#+ format)]]]
[type (#+ :share)]]
["." //
["#/" // ("#@." monad)
@@ -31,7 +31,7 @@
(All [expression]
(-> Text (-> Text expression)
(-> Register expression)))
- (|>> %n (format prefix) variable))
+ (|>> %.nat (format prefix) variable))
(def: #export foreign
(All [expression]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux
index 25d6ff91a..41e55749e 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux
@@ -5,8 +5,7 @@
[control
["ex" exception (#+ exception:)]]
[data
- ["." text
- format]
+ ["." text]
[collection
["." list ("#@." functor fold)]
["." set]]]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux
index 52ef8fd1a..ef3920d23 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux
@@ -6,8 +6,6 @@
pipe]
[data
["." product]
- [text
- format]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux
index b7774d396..6503d23f8 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux
@@ -5,7 +5,7 @@
[data
["." product]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
[target
@@ -21,7 +21,7 @@
(def: #export (scope generate [start initsS+ bodyS])
(-> Phase (Scope Synthesis) (Operation (Expression Any)))
(do ////.monad
- [@loop (:: @ map (|>> %n (format "loop") _.local) ///.next)
+ [@loop (:: @ map (|>> %.nat (format "loop") _.local) ///.next)
initsO+ (monad.map @ generate initsS+)
bodyO (///.with-anchor @loop
(generate bodyS))]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux
index f0d88923e..a4062693c 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux
@@ -10,7 +10,7 @@
[number (#+ hex)
["." i64]]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#@." functor)]]]
["." macro
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux
index bd478f921..861032fc7 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux
@@ -6,8 +6,7 @@
["ex" exception (#+ exception:)]]
[data
["." number]
- ["." text
- format]
+ ["." text]
[collection
["." list ("#@." functor fold)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux
index 8140c769f..42c1d196d 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux
@@ -10,8 +10,7 @@
[data
["e" error]
["." product]
- ["." text
- format]
+ ["." text]
[number (#+ hex)]
[collection
["." list ("#;." functor)]
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux
index 36de9712e..41a2e6b17 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux
@@ -7,7 +7,7 @@
[data
["." product]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#;." functor)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux
index 086d53fe3..a0a5d74eb 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux
@@ -4,8 +4,7 @@
["." monad (#+ do)]]
[data
["." product]
- ["." text
- format]
+ ["." text]
[collection
["." list ("#;." functor)]]]
[target
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux
index 4a617e29c..992701393 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux
@@ -9,7 +9,7 @@
[data
[number (#+ hex)]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#;." monad)]]]
[macro
diff --git a/stdlib/source/lux/tool/compiler/phase/macro.lux b/stdlib/source/lux/tool/compiler/phase/macro.lux
index 9a94f9a4b..10d3cd332 100644
--- a/stdlib/source/lux/tool/compiler/phase/macro.lux
+++ b/stdlib/source/lux/tool/compiler/phase/macro.lux
@@ -7,7 +7,7 @@
[data
["." error (#+ Error)]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
[array (#+ Array)]
["." list ("#@." functor)]]]
@@ -16,15 +16,15 @@
(exception: #export (expansion-failed {macro Name} {inputs (List Code)} {error Text})
(exception.report
- ["Macro" (%name macro)]
- ["Inputs" (exception.enumerate %code inputs)]
+ ["Macro" (%.name macro)]
+ ["Inputs" (exception.enumerate %.code inputs)]
["Error" error]))
(exception: #export (must-have-single-expansion {macro Name} {inputs (List Code)} {outputs (List Code)})
(exception.report
- ["Macro" (%name macro)]
- ["Inputs" (exception.enumerate %code inputs)]
- ["Outputs" (exception.enumerate %code outputs)]))
+ ["Macro" (%.name macro)]
+ ["Inputs" (exception.enumerate %.code inputs)]
+ ["Outputs" (exception.enumerate %.code outputs)]))
(type: #export Expander
(-> Macro (List Code) Lux (Error (Error [Lux (List Code)]))))
diff --git a/stdlib/source/lux/tool/compiler/phase/statement.lux b/stdlib/source/lux/tool/compiler/phase/statement.lux
index 2f3c68f7b..250d14721 100644
--- a/stdlib/source/lux/tool/compiler/phase/statement.lux
+++ b/stdlib/source/lux/tool/compiler/phase/statement.lux
@@ -6,7 +6,7 @@
["." exception (#+ exception:)]]
[data
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#;." fold monoid)]]]
["." macro]]
@@ -22,15 +22,15 @@
(exception: #export (not-a-statement {code Code})
(exception.report
- ["Statement" (%code code)]))
+ ["Statement" (%.code code)]))
(exception: #export (invalid-macro-call {code Code})
(exception.report
- ["Code" (%code code)]))
+ ["Code" (%.code code)]))
(exception: #export (macro-was-not-found {name Name})
(exception.report
- ["Name" (%name name)]))
+ ["Name" (%.name name)]))
(with-expansions [<lux_def_module> (as-is [|form-cursor| (#.Form (list& [|text-cursor| (#.Text "lux def module")] annotations))])]
(def: #export (phase expander)
diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux
index ea8615949..8ee2ab8c2 100644
--- a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux
@@ -8,8 +8,7 @@
[data
["." product]
["." bit ("#@." equivalence)]
- ["." text ("#@." equivalence)
- format]
+ ["." text ("#@." equivalence)]
[number
["." frac ("#@." equivalence)]]
[collection
diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux
index 8d1b71d90..dbcc56e38 100644
--- a/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux
@@ -7,7 +7,7 @@
[data
["." maybe]
["." text
- format]
+ ["%" format (#+ format)]]
[collection
["." list ("#;." functor monoid fold)]
["dict" dictionary (#+ Dictionary)]]]]
@@ -20,7 +20,7 @@
["/" synthesis (#+ Path Synthesis Operation Phase)]]]])
(exception: #export (cannot-find-foreign-variable-in-environment {foreign Register} {environment Environment})
- (ex.report ["Foreign" (%n foreign)]
+ (ex.report ["Foreign" (%.nat foreign)]
["Environment" (|> environment
(list;map ////reference.%variable)
(text.join-with " "))]))
diff --git a/stdlib/source/lux/tool/compiler/reference.lux b/stdlib/source/lux/tool/compiler/reference.lux
index 20d819ef7..53aa769a8 100644
--- a/stdlib/source/lux/tool/compiler/reference.lux
+++ b/stdlib/source/lux/tool/compiler/reference.lux
@@ -7,7 +7,7 @@
pipe]
[data
[text
- format]]])
+ ["%" format (#+ Format format)]]]])
(type: #export Register Nat)
@@ -74,10 +74,10 @@
(Format Variable)
(case variable
(#Local local)
- (format "+" (%n local))
+ (format "+" (%.nat local))
(#Foreign foreign)
- (format "-" (%n foreign))))
+ (format "-" (%.nat foreign))))
(def: #export (%reference reference)
(Format Reference)
@@ -86,4 +86,4 @@
(%variable variable)
(#Constant constant)
- (%name constant)))
+ (%.name constant)))
diff --git a/stdlib/source/lux/tool/compiler/statement.lux b/stdlib/source/lux/tool/compiler/statement.lux
index 441b47f83..5f816204c 100644
--- a/stdlib/source/lux/tool/compiler/statement.lux
+++ b/stdlib/source/lux/tool/compiler/statement.lux
@@ -1,8 +1,6 @@
(.module:
[lux (#- Module)
[data
- [text
- format]
[collection
["." list ("#;." monoid)]]]]
[//
diff --git a/stdlib/source/lux/tool/compiler/synthesis.lux b/stdlib/source/lux/tool/compiler/synthesis.lux
index a30d11b92..edb618dd4 100644
--- a/stdlib/source/lux/tool/compiler/synthesis.lux
+++ b/stdlib/source/lux/tool/compiler/synthesis.lux
@@ -8,7 +8,7 @@
[data
["." bit ("#;." equivalence)]
["." text ("#;." equivalence)
- format]
+ ["%" format (#+ Format format)]]
[collection
["." list ("#;." functor)]
["." dictionary (#+ Dictionary)]]]]
@@ -265,16 +265,16 @@
(format "(? "
(case primitive
(#Bit value)
- (%b value)
+ (%.bit value)
(#I64 value)
- (%i (.int value))
+ (%.int (.int value))
(#F64 value)
- (%f value)
+ (%.frac value)
(#Text value)
- (%t value))
+ (%.text value))
")")
(#Access access)
@@ -282,21 +282,21 @@
(#Side side)
(case side
(#.Left lefts)
- (format "(" (%n lefts) " #0" ")")
+ (format "(" (%.nat lefts) " #0" ")")
(#.Right lefts)
- (format "(" (%n lefts) " #1" ")"))
+ (format "(" (%.nat lefts) " #1" ")"))
(#Member member)
(case member
(#.Left lefts)
- (format "[" (%n lefts) " #0" "]")
+ (format "[" (%.nat lefts) " #0" "]")
(#.Right lefts)
- (format "[" (%n lefts) " #1" "]")))
+ (format "[" (%.nat lefts) " #1" "]")))
(#Bind register)
- (format "(@ " (%n register) ")")
+ (format "(@ " (%.nat register) ")")
(#Alt left right)
(format "(| " (%path' %then left) " " (%path' %then right) ")")
@@ -316,18 +316,18 @@
(^template [<pattern> <format>]
(<pattern> value)
(<format> value))
- ([#Bit %b]
- [#F64 %f]
- [#Text %t])
+ ([#Bit %.bit]
+ [#F64 %.frac]
+ [#Text %.text])
(#I64 value)
- (%i (.int value)))
+ (%.int (.int value)))
(#Structure structure)
(case structure
(#//analysis.Variant [lefts right? content])
(|> (%synthesis content)
- (format (%n lefts) " " (%b right?) " ")
+ (format (%.nat lefts) " " (%.bit right?) " ")
(text.enclose ["(" ")"]))
(#//analysis.Tuple members)
@@ -345,7 +345,7 @@
(case function
(#Abstraction [environment arity body])
(|> (%synthesis body)
- (format (%n arity) " ")
+ (format (%.nat arity) " ")
(format (|> environment
(list;map //reference.%variable)
(text.join-with " ")
@@ -362,7 +362,7 @@
(#Branch branch)
(case branch
(#Let input register body)
- (|> (format (%synthesis input) " " (%n register) " " (%synthesis body))
+ (|> (format (%synthesis input) " " (%.nat register) " " (%synthesis body))
(text.enclose ["(#let " ")"]))
(#If test then else)
@@ -380,7 +380,7 @@
(#Extension [name args])
(|> (list;map %synthesis args)
(text.join-with " ")
- (format (%t name))
+ (format (%.text name))
(text.enclose ["(" ")"]))))
(def: #export %path
@@ -393,9 +393,9 @@
(^template [<tag> <eq> <format>]
[(<tag> reference') (<tag> sample')]
(<eq> reference' sample'))
- ([#Bit bit;= %b]
- [#F64 f/= %f]
- [#Text text;= %t])
+ ([#Bit bit;= %.bit]
+ [#F64 f/= %.frac]
+ [#Text text;= %.text])
[(#I64 reference') (#I64 sample')]
(i/= (.int reference') (.int sample'))