aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux
diff options
context:
space:
mode:
authorEduardo Julian2020-11-24 05:18:04 -0400
committerEduardo Julian2020-11-24 05:18:04 -0400
commitc4bbfea18d995948012f45a6afda7a6e6ba56f84 (patch)
treeb3c425471830788965776fd173169f084d9f6af4 /stdlib/source/lux
parentd89d837de3475b75587a4293e094d755d2cd4626 (diff)
Better error messages when re-using a name when making a definition.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux4
-rw-r--r--stdlib/source/lux/data/color.lux28
-rw-r--r--stdlib/source/lux/host.js.lux26
-rw-r--r--stdlib/source/lux/host.old.lux186
-rw-r--r--stdlib/source/lux/tool/compiler/language/lux/analysis.lux30
-rw-r--r--stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux5
-rw-r--r--stdlib/source/lux/tool/compiler/language/lux/generation.lux8
-rw-r--r--stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux12
-rw-r--r--stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux10
-rw-r--r--stdlib/source/lux/tool/compiler/language/lux/program.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/meta/archive.lux16
-rw-r--r--stdlib/source/lux/tool/compiler/meta/archive/artifact.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/meta/cache/dependency.lux10
-rw-r--r--stdlib/source/lux/tool/compiler/meta/io/archive.lux34
-rw-r--r--stdlib/source/lux/tool/compiler/meta/io/context.lux14
-rw-r--r--stdlib/source/lux/tool/compiler/meta/packager.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/meta/packager/jvm.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/meta/packager/script.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/phase.lux4
-rw-r--r--stdlib/source/lux/type.lux80
-rw-r--r--stdlib/source/lux/type/abstract.lux30
-rw-r--r--stdlib/source/lux/type/check.lux44
-rw-r--r--stdlib/source/lux/type/implicit.lux40
-rw-r--r--stdlib/source/lux/type/resource.lux8
25 files changed, 317 insertions, 304 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index c65384392..959f6f910 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -420,11 +420,11 @@
#1)
## (type: Alias
-## [Text Text])
+## Name)
("lux def" Alias
("lux check type"
(#Named ["lux" "Alias"]
- (#Product Text Text)))
+ Name))
(record$ #Nil)
#1)
diff --git a/stdlib/source/lux/data/color.lux b/stdlib/source/lux/data/color.lux
index 4334e7f41..1f5c592f3 100644
--- a/stdlib/source/lux/data/color.lux
+++ b/stdlib/source/lux/data/color.lux
@@ -2,7 +2,8 @@
[lux #*
[abstract
[equivalence (#+ Equivalence)]
- [monoid (#+ Monoid)]]
+ [monoid (#+ Monoid)]
+ ["." hash (#+ Hash)]]
[data
[number
["n" nat]
@@ -58,15 +59,24 @@
(-> Color RGB)
(|>> :representation))
- (structure: #export equivalence
+ (def: #export hash
+ (Hash Color)
+ (let [hash ($_ hash.product
+ n.hash
+ n.hash
+ n.hash)]
+ (structure
+ (def: &equivalence
+ (structure
+ (def: (= reference sample)
+ (:: hash = (:representation reference) (:representation sample)))))
+
+ (def: hash
+ (|>> :representation (:: hash hash))))))
+
+ (def: #export equivalence
(Equivalence Color)
-
- (def: (= reference sample)
- (let [[rr rg rb] (:representation reference)
- [sr sg sb] (:representation sample)]
- (and (n.= rr sr)
- (n.= rg sg)
- (n.= rb sb)))))
+ (:: ..hash &equivalence))
(def: #export black
(..from-rgb {#red 0
diff --git a/stdlib/source/lux/host.js.lux b/stdlib/source/lux/host.js.lux
index bb18e5596..da2f5a9c5 100644
--- a/stdlib/source/lux/host.js.lux
+++ b/stdlib/source/lux/host.js.lux
@@ -12,7 +12,7 @@
["." text
["%" format (#+ format)]]
[collection
- ["." list ("#@." functor fold)]]]
+ ["." list ("#\." functor fold)]]]
[type
abstract]
["." meta (#+ with-gensyms)]
@@ -120,7 +120,7 @@
(def: input-variables
(-> (List Nullable) (List [Bit Code]))
(|>> list.enumeration
- (list@map (function (_ [idx [nullable? type]])
+ (list\map (function (_ [idx [nullable? type]])
[nullable? (|> idx %.nat code.local-identifier)]))))
(def: (nullable-type [nullable? type])
@@ -198,8 +198,8 @@
(-> Code Code Text (List Nullable) Bit Bit Nullable Code)
(let [g!inputs (input-variables inputsT)]
(` (def: ((~ g!method)
- [(~+ (list@map product.right g!inputs))])
- (-> [(~+ (list@map nullable-type inputsT))]
+ [(~+ (list\map product.right g!inputs))])
+ (-> [(~+ (list\map nullable-type inputsT))]
(~ (|> (nullable-type outputT)
(try-type try?)
(io-type io?))))
@@ -209,7 +209,7 @@
(without-null g!temp outputT)
(` ("js apply"
("js constant" (~ (code.text source)))
- (~+ (list@map (with-null g!temp) g!inputs)))))))))))
+ (~+ (list\map (with-null g!temp) g!inputs)))))))))))
(syntax: #export (import: {import ..import})
(with-gensyms [g!temp]
@@ -222,18 +222,18 @@
real-class (text.replace-all "/" "." class)]
(wrap (list& (` (type: (~ g!type)
(..Object (primitive (~ (code.text real-class))))))
- (list@map (function (_ member)
+ (list\map (function (_ member)
(case member
(#Constructor inputsT)
(let [g!inputs (input-variables inputsT)]
(` (def: ((~ (qualify "new"))
- [(~+ (list@map product.right g!inputs))])
- (-> [(~+ (list@map nullable-type inputsT))]
+ [(~+ (list\map product.right g!inputs))])
+ (-> [(~+ (list\map nullable-type inputsT))]
(~ g!type))
(:assume
("js object new"
("js constant" (~ (code.text real-class)))
- [(~+ (list@map (with-null g!temp) g!inputs))])))))
+ [(~+ (list\map (with-null g!temp) g!inputs))])))))
(#Field [static? field fieldT])
(if static?
@@ -262,9 +262,9 @@
(#Virtual [method alias inputsT io? try? outputT])
(let [g!inputs (input-variables inputsT)]
(` (def: ((~ (qualify (maybe.default method alias)))
- [(~+ (list@map product.right g!inputs))]
+ [(~+ (list\map product.right g!inputs))]
(~ g!object))
- (-> [(~+ (list@map nullable-type inputsT))]
+ (-> [(~+ (list\map nullable-type inputsT))]
(~ g!type)
(~ (|> (nullable-type outputT)
(try-type try?)
@@ -276,7 +276,7 @@
(` ("js object do"
(~ (code.text method))
(~ g!object)
- [(~+ (list@map (with-null g!temp) g!inputs))])))))))))))
+ [(~+ (list\map (with-null g!temp) g!inputs))])))))))))))
members)))))
(#Function [name alias inputsT io? try? outputT])
@@ -315,7 +315,7 @@
(~ g!_)
(..constant (~ type) [(~ (code.local-identifier (format head "." next)))
- (~+ (list@map code.local-identifier tail))])))))))))))
+ (~+ (list\map code.local-identifier tail))])))))))))))
(template: (!defined? <constant>)
(.case (..constant Any <constant>)
diff --git a/stdlib/source/lux/host.old.lux b/stdlib/source/lux/host.old.lux
index af26b4372..70819c754 100644
--- a/stdlib/source/lux/host.old.lux
+++ b/stdlib/source/lux/host.old.lux
@@ -12,14 +12,14 @@
[data
["." maybe]
["." product]
- ["." bit ("#@." codec)]
+ ["." bit ("#\." codec)]
number
- ["." text ("#@." equivalence monoid)
+ ["." text ("#\." equivalence monoid)
["%" format (#+ format)]]
[collection
["." array (#+ Array)]
- ["." list ("#@." monad fold monoid)]]]
- ["." type ("#@." equivalence)]
+ ["." list ("#\." monad fold monoid)]]]
+ ["." type ("#\." equivalence)]
[macro
["." code]
[syntax (#+ syntax:)]]
@@ -284,7 +284,7 @@
[[name params] _ _]
(let [name (sanitize name)
- =params (list@map (class->type' mode type-params in-array?) params)]
+ =params (list\map (class->type' mode type-params in-array?) params)]
(` (primitive (~ (code.text name)) [(~+ =params)])))))
(def: (class->type' mode type-params in-array? class)
@@ -292,7 +292,7 @@
(case class
(#GenericTypeVar name)
(case (list.find (function (_ [pname pbounds])
- (and (text@= name pname)
+ (and (text\= name pname)
(not (list.empty? pbounds))))
type-params)
#.None
@@ -326,7 +326,7 @@
(def: (class-decl-type$ (^slots [#class-name #class-params]))
(-> Class-Declaration Code)
- (let [=params (list@map (: (-> Type-Parameter Code)
+ (let [=params (list\map (: (-> Type-Parameter Code)
(function (_ [pname pbounds])
(case pbounds
#.Nil
@@ -345,7 +345,7 @@
(case class
(#GenericTypeVar name)
(case (list.find (function (_ [pname pbounds])
- (and (text@= name pname)
+ (and (text\= name pname)
(not (list.empty? pbounds))))
env)
#.None
@@ -411,12 +411,12 @@
(case (f input)
(^template [<tag>]
[[meta (<tag> parts)]
- [meta (<tag> (list@map (pre-walk-replace f) parts))]])
+ [meta (<tag> (list\map (pre-walk-replace f) parts))]])
([#.Form]
[#.Tuple])
[meta (#.Record pairs)]
- [meta (#.Record (list@map (: (-> [Code Code] [Code Code])
+ [meta (#.Record (list\map (: (-> [Code Code] [Code Code])
(function (_ [key val])
[(pre-walk-replace f key) (pre-walk-replace f val)]))
pairs))]
@@ -450,7 +450,7 @@
[args (: (Parser (List Code))
(s.form (p.after (s.this! (' ::new!))
(s.tuple (p.exactly (list.size arg-decls) s.any)))))
- #let [arg-decls' (: (List Text) (list@map (|>> product.right (simple-class$ params)) arg-decls))]]
+ #let [arg-decls' (: (List Text) (list\map (|>> product.right (simple-class$ params)) arg-decls))]]
(wrap (` ((~ (code.text (format "jvm new" ":" class-name ":" (text.join-with "," arg-decls'))))
(~+ args))))))
@@ -461,7 +461,7 @@
args (: (Parser (List Code))
(s.form (p.after (s.this! (code.identifier ["" dotted-name]))
(s.tuple (p.exactly (list.size arg-decls) s.any)))))
- #let [arg-decls' (: (List Text) (list@map (|>> product.right (simple-class$ params)) arg-decls))]]
+ #let [arg-decls' (: (List Text) (list\map (|>> product.right (simple-class$ params)) arg-decls))]]
(wrap (`' ((~ (code.text (format "jvm invokestatic" ":" class-name ":" method-name ":" (text.join-with "," arg-decls'))))
(~+ args))))))
@@ -473,7 +473,7 @@
args (: (Parser (List Code))
(s.form (p.after (s.this! (code.identifier ["" dotted-name]))
(s.tuple (p.exactly (list.size arg-decls) s.any)))))
- #let [arg-decls' (: (List Text) (list@map (|>> product.right (simple-class$ params)) arg-decls))]]
+ #let [arg-decls' (: (List Text) (list\map (|>> product.right (simple-class$ params)) arg-decls))]]
(wrap (`' ((~ (code.text (format <jvm-op> ":" class-name ":" method-name ":" (text.join-with "," arg-decls'))))
(~' _jvm_this) (~+ args))))))]
@@ -544,7 +544,7 @@
(do p.monad
[name s.local-identifier
_ (assert-no-periods name)]
- (if (list.member? text.equivalence (list@map product.left type-vars) name)
+ (if (list.member? text.equivalence (list\map product.left type-vars) name)
(wrap (#GenericTypeVar name))
(wrap (#GenericClass name (list)))))
(s.tuple (do p.monad
@@ -569,7 +569,7 @@
_ (assert-no-periods name)
params (p.some recur^)
_ (p.assert (format name " cannot be a type-parameter!")
- (not (list.member? text.equivalence (list@map product.left type-vars) name)))]
+ (not (list.member? text.equivalence (list\map product.left type-vars) name)))]
(wrap (#GenericClass name params))))
))))
@@ -713,7 +713,7 @@
[pm privacy-modifier^
strict-fp? (p.parses? (s.this! (' #strict)))
method-vars ..type-params^
- #let [total-vars (list@compose class-vars method-vars)]
+ #let [total-vars (list\compose class-vars method-vars)]
[_ arg-decls] (s.form (p.and (s.this! (' new))
(..arg-decls^ total-vars)))
constructor-args (..constructor-args^ total-vars)
@@ -732,7 +732,7 @@
strict-fp? (p.parses? (s.this! (' #strict)))
final? (p.parses? (s.this! (' #final)))
method-vars ..type-params^
- #let [total-vars (list@compose class-vars method-vars)]
+ #let [total-vars (list\compose class-vars method-vars)]
[name this-name arg-decls] (s.form ($_ p.and
s.local-identifier
s.local-identifier
@@ -755,7 +755,7 @@
[strict-fp? (p.parses? (s.this! (' #strict)))
owner-class ..class-decl^
method-vars ..type-params^
- #let [total-vars (list@compose (product.right owner-class) method-vars)]
+ #let [total-vars (list\compose (product.right owner-class) method-vars)]
[name this-name arg-decls] (s.form ($_ p.and
s.local-identifier
s.local-identifier
@@ -879,7 +879,7 @@
[tvars ..type-params^
_ (s.this! (' new))
?alias import-member-alias^
- #let [total-vars (list@compose owner-vars tvars)]
+ #let [total-vars (list\compose owner-vars tvars)]
?prim-mode (p.maybe primitive-mode^)
args (..import-member-args^ total-vars)
[io? try? maybe?] import-member-return-flags^]
@@ -900,7 +900,7 @@
tvars ..type-params^
name s.local-identifier
?alias import-member-alias^
- #let [total-vars (list@compose owner-vars tvars)]
+ #let [total-vars (list\compose owner-vars tvars)]
?prim-mode (p.maybe primitive-mode^)
args (..import-member-args^ total-vars)
[io? try? maybe?] import-member-return-flags^
@@ -965,7 +965,7 @@
(def: (annotation$ [name params])
(-> Annotation JVM-Code)
- (format "(" name " " "{" (text.join-with text.tab (list@map annotation-param$ params)) "}" ")"))
+ (format "(" name " " "{" (text.join-with text.tab (list\map annotation-param$ params)) "}" ")"))
(def: (bound-kind$ kind)
(-> BoundKind JVM-Code)
@@ -980,7 +980,7 @@
name
(#GenericClass name params)
- (format "(" (sanitize name) " " (spaced (list@map generic-type$ params)) ")")
+ (format "(" (sanitize name) " " (spaced (list\map generic-type$ params)) ")")
(#GenericArray param)
(format "(" array.type-name " " (generic-type$ param) ")")
@@ -993,25 +993,25 @@
(def: (type-param$ [name bounds])
(-> Type-Parameter JVM-Code)
- (format "(" name " " (spaced (list@map generic-type$ bounds)) ")"))
+ (format "(" name " " (spaced (list\map generic-type$ bounds)) ")"))
(def: (class-decl$ (^open "."))
(-> Class-Declaration JVM-Code)
- (format "(" (sanitize class-name) " " (spaced (list@map type-param$ class-params)) ")"))
+ (format "(" (sanitize class-name) " " (spaced (list\map type-param$ class-params)) ")"))
(def: (super-class-decl$ (^slots [#super-class-name #super-class-params]))
(-> Super-Class-Decl JVM-Code)
- (format "(" (sanitize super-class-name) " " (spaced (list@map generic-type$ super-class-params)) ")"))
+ (format "(" (sanitize super-class-name) " " (spaced (list\map generic-type$ super-class-params)) ")"))
(def: (method-decl$ [[name pm anns] method-decl])
(-> [Member-Declaration MethodDecl] JVM-Code)
(let [(^slots [#method-tvars #method-inputs #method-output #method-exs]) method-decl]
(with-parens
(spaced (list name
- (with-brackets (spaced (list@map annotation$ anns)))
- (with-brackets (spaced (list@map type-param$ method-tvars)))
- (with-brackets (spaced (list@map generic-type$ method-exs)))
- (with-brackets (spaced (list@map generic-type$ method-inputs)))
+ (with-brackets (spaced (list\map annotation$ anns)))
+ (with-brackets (spaced (list\map type-param$ method-tvars)))
+ (with-brackets (spaced (list\map generic-type$ method-exs)))
+ (with-brackets (spaced (list\map generic-type$ method-inputs)))
(generic-type$ method-output))
))))
@@ -1028,7 +1028,7 @@
(#ConstantField class value)
(with-parens
(spaced (list "constant" name
- (with-brackets (spaced (list@map annotation$ anns)))
+ (with-brackets (spaced (list\map annotation$ anns)))
(generic-type$ class)
(code.format value))
))
@@ -1038,7 +1038,7 @@
(spaced (list "variable" name
(privacy-modifier$ pm)
(state-modifier$ sm)
- (with-brackets (spaced (list@map annotation$ anns)))
+ (with-brackets (spaced (list\map annotation$ anns)))
(generic-type$ class))
))
))
@@ -1060,12 +1060,12 @@
(with-parens
(spaced (list "init"
(privacy-modifier$ pm)
- (bit@encode strict-fp?)
- (with-brackets (spaced (list@map annotation$ anns)))
- (with-brackets (spaced (list@map type-param$ type-vars)))
- (with-brackets (spaced (list@map generic-type$ exs)))
- (with-brackets (spaced (list@map arg-decl$ arg-decls)))
- (with-brackets (spaced (list@map constructor-arg$ constructor-args)))
+ (bit\encode strict-fp?)
+ (with-brackets (spaced (list\map annotation$ anns)))
+ (with-brackets (spaced (list\map type-param$ type-vars)))
+ (with-brackets (spaced (list\map generic-type$ exs)))
+ (with-brackets (spaced (list\map arg-decl$ arg-decls)))
+ (with-brackets (spaced (list\map constructor-arg$ constructor-args)))
(code.format (pre-walk-replace replacer body))
)))
@@ -1074,12 +1074,12 @@
(spaced (list "virtual"
name
(privacy-modifier$ pm)
- (bit@encode final?)
- (bit@encode strict-fp?)
- (with-brackets (spaced (list@map annotation$ anns)))
- (with-brackets (spaced (list@map type-param$ type-vars)))
- (with-brackets (spaced (list@map generic-type$ exs)))
- (with-brackets (spaced (list@map arg-decl$ arg-decls)))
+ (bit\encode final?)
+ (bit\encode strict-fp?)
+ (with-brackets (spaced (list\map annotation$ anns)))
+ (with-brackets (spaced (list\map type-param$ type-vars)))
+ (with-brackets (spaced (list\map generic-type$ exs)))
+ (with-brackets (spaced (list\map arg-decl$ arg-decls)))
(generic-type$ return-type)
(code.format (pre-walk-replace replacer (` (let [(~ (code.local-identifier this-name)) (~' _jvm_this)]
(~ body))))))))
@@ -1088,7 +1088,7 @@
(let [super-replacer (parser->replacer (s.form (do p.monad
[_ (s.this! (' ::super!))
args (s.tuple (p.exactly (list.size arg-decls) s.any))
- #let [arg-decls' (: (List Text) (list@map (|>> product.right (simple-class$ (list)))
+ #let [arg-decls' (: (List Text) (list\map (|>> product.right (simple-class$ (list)))
arg-decls))]]
(wrap (`' ((~ (code.text (format "jvm invokespecial"
":" (get@ #super-class-name super-class)
@@ -1099,11 +1099,11 @@
(spaced (list "override"
(class-decl$ class-decl)
name
- (bit@encode strict-fp?)
- (with-brackets (spaced (list@map annotation$ anns)))
- (with-brackets (spaced (list@map type-param$ type-vars)))
- (with-brackets (spaced (list@map generic-type$ exs)))
- (with-brackets (spaced (list@map arg-decl$ arg-decls)))
+ (bit\encode strict-fp?)
+ (with-brackets (spaced (list\map annotation$ anns)))
+ (with-brackets (spaced (list\map type-param$ type-vars)))
+ (with-brackets (spaced (list\map generic-type$ exs)))
+ (with-brackets (spaced (list\map arg-decl$ arg-decls)))
(generic-type$ return-type)
(|> (` (let [(~ (code.local-identifier this-name)) (~' _jvm_this)]
(~ body)))
@@ -1117,11 +1117,11 @@
(spaced (list "static"
name
(privacy-modifier$ pm)
- (bit@encode strict-fp?)
- (with-brackets (spaced (list@map annotation$ anns)))
- (with-brackets (spaced (list@map type-param$ type-vars)))
- (with-brackets (spaced (list@map generic-type$ exs)))
- (with-brackets (spaced (list@map arg-decl$ arg-decls)))
+ (bit\encode strict-fp?)
+ (with-brackets (spaced (list\map annotation$ anns)))
+ (with-brackets (spaced (list\map type-param$ type-vars)))
+ (with-brackets (spaced (list\map generic-type$ exs)))
+ (with-brackets (spaced (list\map arg-decl$ arg-decls)))
(generic-type$ return-type)
(code.format (pre-walk-replace replacer body)))))
@@ -1130,10 +1130,10 @@
(spaced (list "abstract"
name
(privacy-modifier$ pm)
- (with-brackets (spaced (list@map annotation$ anns)))
- (with-brackets (spaced (list@map type-param$ type-vars)))
- (with-brackets (spaced (list@map generic-type$ exs)))
- (with-brackets (spaced (list@map arg-decl$ arg-decls)))
+ (with-brackets (spaced (list\map annotation$ anns)))
+ (with-brackets (spaced (list\map type-param$ type-vars)))
+ (with-brackets (spaced (list\map generic-type$ exs)))
+ (with-brackets (spaced (list\map arg-decl$ arg-decls)))
(generic-type$ return-type))))
(#NativeMethod type-vars arg-decls return-type exs)
@@ -1141,10 +1141,10 @@
(spaced (list "native"
name
(privacy-modifier$ pm)
- (with-brackets (spaced (list@map annotation$ anns)))
- (with-brackets (spaced (list@map type-param$ type-vars)))
- (with-brackets (spaced (list@map generic-type$ exs)))
- (with-brackets (spaced (list@map arg-decl$ arg-decls)))
+ (with-brackets (spaced (list\map annotation$ anns)))
+ (with-brackets (spaced (list\map type-param$ type-vars)))
+ (with-brackets (spaced (list\map generic-type$ exs)))
+ (with-brackets (spaced (list\map arg-decl$ arg-decls)))
(generic-type$ return-type))))
))
@@ -1203,19 +1203,19 @@
(do meta.monad
[current-module meta.current-module-name
#let [fully-qualified-class-name (format (sanitize current-module) "." full-class-name)
- field-parsers (list@map (field->parser fully-qualified-class-name) fields)
- method-parsers (list@map (method->parser (product.right class-decl) fully-qualified-class-name) methods)
- replacer (parser->replacer (list@fold p.either
+ field-parsers (list\map (field->parser fully-qualified-class-name) fields)
+ method-parsers (list\map (method->parser (product.right class-decl) fully-qualified-class-name) methods)
+ replacer (parser->replacer (list\fold p.either
(p.fail "")
- (list@compose field-parsers method-parsers)))
+ (list\compose field-parsers method-parsers)))
def-code (format "jvm class:"
(spaced (list (class-decl$ class-decl)
(super-class-decl$ super)
- (with-brackets (spaced (list@map super-class-decl$ interfaces)))
+ (with-brackets (spaced (list\map super-class-decl$ interfaces)))
(inheritance-modifier$ im)
- (with-brackets (spaced (list@map annotation$ annotations)))
- (with-brackets (spaced (list@map field-decl$ fields)))
- (with-brackets (spaced (list@map (method-def$ replacer super) methods))))))]]
+ (with-brackets (spaced (list\map annotation$ annotations)))
+ (with-brackets (spaced (list\map field-decl$ fields)))
+ (with-brackets (spaced (list\map (method-def$ replacer super) methods))))))]]
(wrap (list (` ((~ (code.text def-code))))))))
(syntax: #export (interface:
@@ -1230,9 +1230,9 @@
([] foo [boolean String] void #throws [Exception])))}
(let [def-code (format "jvm interface:"
(spaced (list (class-decl$ class-decl)
- (with-brackets (spaced (list@map super-class-decl$ supers)))
- (with-brackets (spaced (list@map annotation$ annotations)))
- (spaced (list@map method-decl$ members)))))]
+ (with-brackets (spaced (list\map super-class-decl$ supers)))
+ (with-brackets (spaced (list\map annotation$ annotations)))
+ (spaced (list\map method-decl$ members)))))]
(wrap (list (` ((~ (code.text def-code))))))
))
@@ -1257,9 +1257,9 @@
)}
(let [def-code (format "jvm anon-class:"
(spaced (list (super-class-decl$ super)
- (with-brackets (spaced (list@map super-class-decl$ interfaces)))
- (with-brackets (spaced (list@map constructor-arg$ constructor-args)))
- (with-brackets (spaced (list@map (method-def$ function.identity super) methods))))))]
+ (with-brackets (spaced (list\map super-class-decl$ interfaces)))
+ (with-brackets (spaced (list\map constructor-arg$ constructor-args)))
+ (with-brackets (spaced (list\map (method-def$ function.identity super) methods))))))]
(wrap (list (` ((~ (code.text def-code))))))))
(syntax: #export (null)
@@ -1354,12 +1354,12 @@
(ClassName::method2 arg3 arg4 arg5)))}
(with-gensyms [g!obj]
(wrap (list (` (let [(~ g!obj) (~ obj)]
- (exec (~+ (list@map (complete-call$ g!obj) methods))
+ (exec (~+ (list\map (complete-call$ g!obj) methods))
(~ g!obj))))))))
(def: (class-import$ [full-name params])
(-> Class-Declaration Code)
- (let [params' (list@map (|>> product.left code.local-identifier) params)]
+ (let [params' (list\map (|>> product.left code.local-identifier) params)]
(` (def: (~ (code.identifier ["" full-name]))
{#..jvm-class (~ (code.text full-name))}
Type
@@ -1371,7 +1371,7 @@
(-> (List Type-Parameter) Import-Member-Declaration (List Type-Parameter))
(case member
(#ConstructorDecl [commons _])
- (list@compose class-tvars (get@ #import-member-tvars commons))
+ (list\compose class-tvars (get@ #import-member-tvars commons))
(#MethodDecl [commons _])
(case (get@ #import-member-kind commons)
@@ -1379,7 +1379,7 @@
(get@ #import-member-tvars commons)
_
- (list@compose class-tvars (get@ #import-member-tvars commons)))
+ (list\compose class-tvars (get@ #import-member-tvars commons)))
_
class-tvars))
@@ -1397,9 +1397,9 @@
(wrap [maybe? arg-name]))))
import-member-args)
#let [arg-classes (: (List Text)
- (list@map (|>> product.right (simple-class$ (list@compose type-params import-member-tvars)))
+ (list\map (|>> product.right (simple-class$ (list\compose type-params import-member-tvars)))
import-member-args))
- arg-types (list@map (: (-> [Bit GenericType] Code)
+ arg-types (list\map (: (-> [Bit GenericType] Code)
(function (_ [maybe? arg])
(let [arg-type (class->type (get@ #import-member-mode commons) type-params arg)]
(if maybe?
@@ -1479,12 +1479,12 @@
(def: (jvm-extension-inputs mode classes inputs)
(-> Primitive-Mode (List Text) (List [Bit Code]) (List Code))
(|> inputs
- (list@map (function (_ [maybe? input])
+ (list\map (function (_ [maybe? input])
(if maybe?
(` ((~! !!!) (~ (un-quote input))))
(un-quote input))))
(list.zip/2 classes)
- (list@map (auto-convert-input mode))))
+ (list\map (auto-convert-input mode))))
(def: (member-def-interop type-params kind class [arg-function-inputs arg-classes arg-types] member method-prefix)
(-> (List Type-Parameter) Class-Kind Class-Declaration [(List [Bit Code]) (List Text) (List Code)] Import-Member-Declaration Text (Meta (List Code)))
@@ -1492,7 +1492,7 @@
full-name (sanitize full-name)
all-params (|> (member-type-vars class-tvars member)
(list.filter free-type-param?)
- (list@map type-param->type-arg))]
+ (list\map type-param->type-arg))]
(case member
(#EnumDecl enum-members)
(do {! meta.monad}
@@ -1504,7 +1504,7 @@
_
(let [=class-tvars (|> class-tvars
(list.filter free-type-param?)
- (list@map type-param->type-arg))]
+ (list\map type-param->type-arg))]
(` (All [(~+ =class-tvars)] (primitive (~ (code.text full-name)) [(~+ =class-tvars)]))))))
getter-interop (: (-> Text Code)
(function (_ name)
@@ -1512,7 +1512,7 @@
(` (def: (~ getter-name)
(~ enum-type)
((~ (code.text (format "jvm getstatic" ":" full-name ":" name)))))))))]]
- (wrap (list@map getter-interop enum-members)))
+ (wrap (list\map getter-interop enum-members)))
(#ConstructorDecl [commons _])
(do meta.monad
@@ -1523,7 +1523,7 @@
(decorate-return-maybe member)
(decorate-return-try member)
(decorate-return-io member))]]
- (wrap (list (` ((~! syntax:) ((~ def-name) (~+ (list@map product.right arg-function-inputs)))
+ (wrap (list (` ((~! syntax:) ((~ def-name) (~+ (list\map product.right arg-function-inputs)))
((~' wrap) (.list (.` (~ jvm-interop)))))))))
(#MethodDecl [commons method])
@@ -1550,13 +1550,13 @@
)))
jvm-extension (code.text (format "jvm " jvm-op ":" full-name ":" import-method-name ":" (text.join-with "," arg-classes)))
jvm-interop (|> [(simple-class$ (list) (get@ #import-method-return method))
- (` ((~ jvm-extension) (~+ (list@map un-quote object-ast))
+ (` ((~ jvm-extension) (~+ (list\map un-quote object-ast))
(~+ (jvm-extension-inputs (get@ #import-member-mode commons) arg-classes arg-function-inputs))))]
(auto-convert-output (get@ #import-member-mode commons))
(decorate-return-maybe member)
(decorate-return-try member)
(decorate-return-io member))]]
- (wrap (list (` ((~! syntax:) ((~ def-name) (~+ (list@map product.right arg-function-inputs)) (~+ object-ast))
+ (wrap (list (` ((~! syntax:) ((~ def-name) (~+ (list\map product.right arg-function-inputs)) (~+ object-ast))
((~' wrap) (.list (.` (~ jvm-interop))))))))))
(#FieldAccessDecl fad)
@@ -1570,7 +1570,7 @@
tvar-asts (: (List Code)
(|> class-tvars
(list.filter free-type-param?)
- (list@map type-param->type-arg)))
+ (list\map type-param->type-arg)))
getter-name (code.identifier ["" (format method-prefix member-separator import-field-name)])
setter-name (code.identifier ["" (format method-prefix member-separator import-field-name "!")])]
getter-interop (with-gensyms [g!obj]
@@ -1693,7 +1693,7 @@
(do {! meta.monad}
[kind (class-kind class-decl)
=members (monad.map ! (member-import$ (product.right class-decl) kind class-decl) members)]
- (wrap (list& (class-import$ class-decl) (list@join =members)))))
+ (wrap (list& (class-import$ class-decl) (list\join =members)))))
(syntax: #export (array {type (..generic-type^ (list))}
size)
@@ -1722,7 +1722,7 @@
(def: (type->class-name type)
(-> Type (Meta Text))
- (if (type@= Any type)
+ (if (type\= Any type)
(:: meta.monad wrap "java.lang.Object")
(case type
(#.Primitive name params)
diff --git a/stdlib/source/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/lux/tool/compiler/language/lux/analysis.lux
index 07cd29140..34d8005e1 100644
--- a/stdlib/source/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/lux/tool/compiler/language/lux/analysis.lux
@@ -11,16 +11,16 @@
[data
["." product]
["." maybe]
- ["." bit ("#@." equivalence)]
+ ["." bit ("#\." equivalence)]
[number
["n" nat]
["i" int]
["r" rev]
["f" frac]]
- ["." text ("#@." equivalence)
+ ["." text ("#\." equivalence)
["%" format (#+ Format format)]]
[collection
- ["." list ("#@." functor fold)]]]
+ ["." list ("#\." functor fold)]]]
[meta
["." location]]]
[//
@@ -116,17 +116,17 @@
(^template [<tag> <=>]
[[(<tag> reference) (<tag> sample)]
(<=> reference sample)])
- ([#Bit bit@=]
+ ([#Bit bit\=]
[#Nat n.=]
[#Int i.=]
[#Rev r.=]
[#Frac f.=]
- [#Text text@=])
+ [#Text text\=])
_
false)))
-(structure: #export (composite-equivalence (^open "/@."))
+(structure: #export (composite-equivalence (^open "/\."))
(All [a] (-> (Equivalence a) (Equivalence (Composite a))))
(def: (= reference sample)
@@ -134,11 +134,11 @@
[(#Variant [reference-lefts reference-right? reference-value])
(#Variant [sample-lefts sample-right? sample-value])]
(and (n.= reference-lefts sample-lefts)
- (bit@= reference-right? sample-right?)
- (/@= reference-value sample-value))
+ (bit\= reference-right? sample-right?)
+ (/\= reference-value sample-value))
[(#Tuple reference) (#Tuple sample)]
- (:: (list.equivalence /@=) = reference sample)
+ (:: (list.equivalence /\=) = reference sample)
_
false)))
@@ -260,7 +260,7 @@
(def: #export (apply [abstraction inputs])
(-> (Application Analysis) Analysis)
- (list@fold (function (_ input abstraction')
+ (list\fold (function (_ input abstraction')
(#Apply input abstraction'))
abstraction
inputs))
@@ -352,7 +352,7 @@
(#Tuple members)
(|> members
- (list@map %analysis)
+ (list\map %analysis)
(text.join-with " ")
(text.enclose ["[" "]"])))
@@ -366,7 +366,7 @@
(|> (%analysis body)
(format " ")
(format (|> environment
- (list@map %analysis)
+ (list\map %analysis)
(text.join-with " ")
(text.enclose ["[" "]"])))
(text.enclose ["(" ")"]))
@@ -375,13 +375,13 @@
(|> analysis
..application
#.Cons
- (list@map %analysis)
+ (list\map %analysis)
(text.join-with " ")
(text.enclose ["(" ")"]))
(#Extension name parameters)
(|> parameters
- (list@map %analysis)
+ (list\map %analysis)
(text.join-with " ")
(format (%.text name) " ")
(text.enclose ["(" ")"]))))
@@ -445,7 +445,7 @@
(def: #export (with-location location action)
(All [a] (-> Location (Operation a) (Operation a)))
- (if (text@= "" (product.left location))
+ (if (text\= "" (product.left location))
action
(function (_ [bundle state])
(let [old-location (get@ #.location state)]
diff --git a/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux b/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux
index b81f8f227..e9c260789 100644
--- a/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux
+++ b/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux
@@ -7,10 +7,7 @@
["." exception (#+ exception:)]]
[data
["." text
- ["%" format (#+ format)]]
- [collection
- [array (#+ Array)]
- ["." list ("#@." functor)]]]
+ ["%" format (#+ format)]]]
["." meta]]
[/////
["." phase]])
diff --git a/stdlib/source/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/lux/tool/compiler/language/lux/generation.lux
index 64e66be2d..0b4ab70b2 100644
--- a/stdlib/source/lux/tool/compiler/language/lux/generation.lux
+++ b/stdlib/source/lux/tool/compiler/language/lux/generation.lux
@@ -10,13 +10,13 @@
[binary (#+ Binary)]
["." product]
["." name]
- ["." text ("#@." equivalence)
+ ["." text ("#\." equivalence)
["%" format (#+ format)]]
[number
["n" nat]]
[collection
["." row (#+ Row)]
- ["." list ("#@." functor)]]]]
+ ["." list ("#\." functor)]]]]
[//
[synthesis (#+ Synthesis)]
[phase
@@ -223,7 +223,7 @@
[?buffer (extension.read (get@ #buffer))]
(case ?buffer
(#.Some buffer)
- (if (row.any? (|>> product.left (text@= name)) buffer)
+ (if (row.any? (|>> product.left (text\= name)) buffer)
(phase.throw ..cannot-overwrite-output [name])
(extension.update (set@ #buffer (#.Some (row.add [name code] buffer)))))
@@ -260,7 +260,7 @@
(let [[_module _name] name]
(do try.monad
[module-id (archive.id _module archive)
- registry (if (text@= (get@ #module state) _module)
+ registry (if (text\= (get@ #module state) _module)
(#try.Success (get@ #registry state))
(do try.monad
[[descriptor document] (archive.find _module archive)]
diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux
index b04c02674..8c1ba3644 100644
--- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux
+++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux
@@ -42,9 +42,15 @@
[cannot-declare-tags-for-foreign-type]
)
-(exception: #export (cannot-define-more-than-once {name Name})
+(exception: #export (cannot-define-more-than-once {name Name} {already-existing Global})
(exception.report
- ["Definition" (%.name name)]))
+ ["Definition" (%.name name)]
+ ["Original" (case already-existing
+ (#.Alias alias)
+ (format "alias " (%.name alias))
+
+ (#.Definition definition)
+ (format "definition " (%.name name)))]))
(exception: #export (can-only-change-state-of-active-module {module Text} {state Module-State})
(exception.report
@@ -144,7 +150,7 @@
[]])
(#.Some already-existing)
- ((/.throw' ..cannot-define-more-than-once [self-name name]) state))))))
+ ((/.throw' ..cannot-define-more-than-once [[self-name name] already-existing]) state))))))
(def: #export (create hash name)
(-> Nat Text (Operation Any))
diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux
index 855d1cf9f..2bde38a7d 100644
--- a/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux
+++ b/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux
@@ -8,7 +8,7 @@
[text
["%" format (#+ format)]]
[collection
- ["." list ("#@." fold monoid)]]]
+ ["." list ("#\." fold monoid)]]]
["." meta]]
["." // #_
["#." extension]
@@ -66,12 +66,12 @@
(case expansion
(^ (list& <lux_def_module> referrals))
(|> (recur archive <lux_def_module>)
- (:: ! map (update@ #/.referrals (list@compose referrals))))
+ (:: ! map (update@ #/.referrals (list\compose referrals))))
_
(|> expansion
(monad.map ! (recur archive))
- (:: ! map (list@fold /.merge-requirements /.no-requirements)))))
+ (:: ! map (list\fold /.merge-requirements /.no-requirements)))))
_
(//.throw ..not-a-directive code))))))
diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux
index e9ecc6435..8477134a0 100644
--- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux
+++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux
@@ -10,7 +10,7 @@
[runtime (#+ Phase Phase!)]
["#." primitive]
["#." structure]
- ["#." reference ("#@." system)]
+ ["#." reference ("#\." system)]
["#." case]
["#." loop]
["#." function]
@@ -22,7 +22,7 @@
[analysis (#+)]
["." synthesis]
["//#" /// #_
- ["#." phase ("#@." monad)]]]]]])
+ ["#." phase ("#\." monad)]]]]]])
(exception: #export cannot-recur-as-an-expression)
@@ -31,7 +31,7 @@
(case synthesis
(^template [<tag>]
[(^ (<tag> value))
- (//////phase@map _.return (expression archive synthesis))])
+ (//////phase\map _.return (expression archive synthesis))])
([synthesis.bit]
[synthesis.i64]
[synthesis.f64]
@@ -59,7 +59,7 @@
(/loop.recur! statement expression archive updates)
(^ (synthesis.function/abstraction abstraction))
- (//////phase@map _.return (/function.function statement expression archive abstraction))
+ (//////phase\map _.return (/function.function statement expression archive abstraction))
))
(def: (expression archive synthesis)
@@ -67,7 +67,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase@wrap (<generator> value))])
+ (//////phase\wrap (<generator> value))])
([synthesis.bit /primitive.bit]
[synthesis.i64 /primitive.i64]
[synthesis.f64 /primitive.f64]
diff --git a/stdlib/source/lux/tool/compiler/language/lux/program.lux b/stdlib/source/lux/tool/compiler/language/lux/program.lux
index 85cb03670..fc384c178 100644
--- a/stdlib/source/lux/tool/compiler/language/lux/program.lux
+++ b/stdlib/source/lux/tool/compiler/language/lux/program.lux
@@ -11,7 +11,7 @@
[text
["%" format (#+ format)]]
[collection
- ["." list ("#@." functor)]]]]
+ ["." list ("#\." functor)]]]]
[//
[generation (#+ Context)]
[///
@@ -52,5 +52,5 @@
#.None
(|> registries
- (list@map (|>> product.left product.left))
+ (list\map (|>> product.left product.left))
(exception.throw ..cannot-find-program)))))
diff --git a/stdlib/source/lux/tool/compiler/meta/archive.lux b/stdlib/source/lux/tool/compiler/meta/archive.lux
index 7ac12f55e..eaabf6aee 100644
--- a/stdlib/source/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/lux/tool/compiler/meta/archive.lux
@@ -18,9 +18,9 @@
[format
["." binary (#+ Writer)]]
[number
- ["n" nat ("#@." equivalence)]]
+ ["n" nat ("#\." equivalence)]]
[collection
- ["." list ("#@." functor fold)]
+ ["." list ("#\." functor fold)]
["." dictionary (#+ Dictionary)]
["." set]]]
[type
@@ -178,7 +178,7 @@
(|>> :representation
(get@ #resolver)
dictionary.entries
- (list@map (function (_ [module [id _]])
+ (list\map (function (_ [module [id _]])
[module id]))))
(def: #export (merge additions archive)
@@ -188,7 +188,7 @@
:representation
(update@ #next (n.max +next))
(update@ #resolver (function (_ resolver)
- (list@fold (function (_ [module [id entry]] resolver)
+ (list\fold (function (_ [module [id entry]] resolver)
(case entry
(#.Some _)
(dictionary.put module [id entry] resolver)
@@ -239,7 +239,7 @@
(-> (List Reservation) Bit)
(n.= (list.size reservations)
(|> reservations
- (list@map product.left)
+ (list\map product.left)
(set.from-list text.hash)
set.size)))
@@ -247,7 +247,7 @@
(-> (List Reservation) Bit)
(n.= (list.size reservations)
(|> reservations
- (list@map product.right)
+ (list\map product.right)
(set.from-list n.hash)
set.size)))
@@ -261,12 +261,12 @@
(do try.monad
[[actual next reservations] (<b>.run ..reader binary)
_ (exception.assert ..version-mismatch [expected actual]
- (n@= expected actual))
+ (n\= expected actual))
_ (exception.assert ..corrupt-data []
(correct-reservations? reservations))]
(wrap (:abstraction
{#next next
- #resolver (list@fold (function (_ [module id] archive)
+ #resolver (list\fold (function (_ [module id] archive)
(dictionary.put module [id #.None] archive))
(get@ #resolver (:representation ..empty))
reservations)}))))
diff --git a/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux b/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux
index 1af87d6fc..dec8938b3 100644
--- a/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux
+++ b/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux
@@ -13,7 +13,7 @@
["%" format (#+ format)]]
[collection
["." list]
- ["." row (#+ Row) ("#@." functor fold)]
+ ["." row (#+ Row) ("#\." functor fold)]
["." dictionary (#+ Dictionary)]]
[format
["." binary (#+ Writer)]]]
@@ -114,7 +114,7 @@
(binary.row/64 category))]
(|>> :representation
(get@ #artifacts)
- (row@map (get@ #category))
+ (row\map (get@ #category))
artifacts)))
(exception: #export (invalid-category {tag Nat})
@@ -135,7 +135,7 @@
5 (:: ! map (|>> #Directive) <b>.text)
_ (<>.fail (exception.construct ..invalid-category [tag])))))]
(|> (<b>.row/64 category)
- (:: <>.monad map (row@fold (function (_ artifact registry)
+ (:: <>.monad map (row\fold (function (_ artifact registry)
(product.right
(case artifact
#Anonymous
diff --git a/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux b/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux
index 0105d0ccd..55bde3869 100644
--- a/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux
+++ b/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux
@@ -8,11 +8,11 @@
["." function
["." memo (#+ Memo)]]]
[data
- ["." maybe ("#@." functor)]
+ ["." maybe ("#\." functor)]
["." text
["%" format (#+ format)]]
[collection
- ["." list ("#@." functor fold)]
+ ["." list ("#\." functor fold)]
["." dictionary (#+ Dictionary)]
["." set (#+ Set)]]]]
[///
@@ -45,7 +45,7 @@
(def: #export graph
(-> (List Dependency) Graph)
- (list@fold (function (_ [module imports] graph)
+ (list\fold (function (_ [module imports] graph)
(dictionary.put module imports graph))
..empty))
@@ -61,9 +61,9 @@
(#try.Failure error)
..fresh)]
ancestors (monad.map ! recur (set.to-list parents))]
- (wrap (list@fold set.union parents ancestors)))))
+ (wrap (list\fold set.union parents ancestors)))))
ancestry (memo.open memo)]
- (list@fold (function (_ module memory)
+ (list\fold (function (_ module memory)
(if (dictionary.contains? module memory)
memory
(let [[memory _] (ancestry [memory module])]
diff --git a/stdlib/source/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/lux/tool/compiler/meta/io/archive.lux
index 1533816fc..63639f444 100644
--- a/stdlib/source/lux/tool/compiler/meta/io/archive.lux
+++ b/stdlib/source/lux/tool/compiler/meta/io/archive.lux
@@ -8,7 +8,7 @@
["." try (#+ Try)]
["." exception (#+ exception:)]
[concurrency
- ["." promise (#+ Promise) ("#@." monad)]]
+ ["." promise (#+ Promise) ("#\." monad)]]
[security
["!" capability (#+ capability:)]]
["<>" parser
@@ -16,10 +16,10 @@
[data
[binary (#+ Binary)]
["." product]
- ["." text ("#@." equivalence)
+ ["." text ("#\." equivalence)
["%" format (#+ format)]]
[collection
- ["." list ("#@." functor fold)]
+ ["." list ("#\." functor fold)]
["." dictionary (#+ Dictionary)]
["." row (#+ Row)]
["." set]]
@@ -191,10 +191,10 @@
[module-dir (!.use (:: system directory) (..module system static module-id))
cached-files (!.use (:: module-dir files) [])]
(|> cached-files
- (list@map (function (_ file)
+ (list\map (function (_ file)
[(!.use (:: file name) [])
(!.use (:: file path) [])]))
- (list.filter (|>> product.left (text@= ..module-descriptor-file) not))
+ (list.filter (|>> product.left (text\= ..module-descriptor-file) not))
(monad.map ! (function (_ [name path])
(do !
[file (: (Promise (Try (File Promise)))
@@ -251,7 +251,7 @@
directives]]))
(#artifact.Definition name)
- (if (text@= $/program.name name)
+ (if (text\= $/program.name name)
(wrap [definitions
[analysers
synthesizers
@@ -331,7 +331,7 @@
(do (try.with promise.monad)
[actual (cached-artifacts system static module-id)
#let [expected (|> descriptor (get@ #descriptor.registry) artifact.artifacts)]
- [document bundles] (promise@wrap (loaded-document (get@ #static.artifact-extension static) host-environment module-id expected actual document))]
+ [document bundles] (promise\wrap (loaded-document (get@ #static.artifact-extension static) host-environment module-id expected actual document))]
(wrap [[descriptor document] bundles])))
(def: (purge! system static [module-name module-id])
@@ -346,9 +346,9 @@
(def: (valid-cache? expected actual)
(-> Descriptor Input Bit)
- (and (text@= (get@ #descriptor.name expected)
+ (and (text\= (get@ #descriptor.name expected)
(get@ #////.module actual))
- (text@= (get@ #descriptor.file expected)
+ (text\= (get@ #descriptor.file expected)
(get@ #////.file actual))
(n.= (get@ #descriptor.hash expected)
(get@ #////.hash actual))))
@@ -369,7 +369,7 @@
(-> (List [Bit [Module [archive.ID [Descriptor (Document .Module)]]]])
dependency.Order
Purge)
- (list@fold (function (_ [module-name [module-id [descriptor document]]] purge)
+ (list\fold (function (_ [module-name [module-id [descriptor document]]] purge)
(let [purged? (: (Predicate Module)
(function (_ module)
(dictionary.contains? module purge)))]
@@ -394,8 +394,8 @@
(monad.map ! (function (_ [module-name module-id])
(do !
[data (..read-module-descriptor system static module-id)
- [descriptor document] (promise@wrap (<b>.run ..parser data))]
- (if (text@= archive.runtime-module module-name)
+ [descriptor document] (promise\wrap (<b>.run ..parser data))]
+ (if (text\= archive.runtime-module module-name)
(wrap [true
[module-name [module-id [descriptor document]]]])
(do !
@@ -403,14 +403,14 @@
(wrap [(..valid-cache? descriptor input)
[module-name [module-id [descriptor document]]]])))))))
load-order (|> pre-loaded-caches
- (list@map product.right)
+ (list\map product.right)
(monad.fold try.monad
(function (_ [module [module-id descriptor,document]] archive)
(archive.add module descriptor,document archive))
archive)
(:: try.monad map (dependency.load-order $.key))
(:: try.monad join)
- promise@wrap)
+ promise\wrap)
#let [purge (..full-purge pre-loaded-caches load-order)]
_ (|> purge
dictionary.entries
@@ -423,7 +423,7 @@
[[descriptor,document bundles] (..load-definitions system static module-id host-environment descriptor,document)]
(wrap [[module-name descriptor,document]
bundles])))))]
- (promise@wrap
+ (promise\wrap
(do {! try.monad}
[archive (monad.fold !
(function (_ [[module descriptor,document] _bundle] archive)
@@ -433,7 +433,7 @@
analysis-state (..analysis-state (get@ #static.host static) archive)]
(wrap [archive
analysis-state
- (list@fold (function (_ [_ [+analysers +synthesizers +generators +directives]]
+ (list\fold (function (_ [_ [+analysers +synthesizers +generators +directives]]
[analysers synthesizers generators directives])
[(dictionary.merge +analysers analysers)
(dictionary.merge +synthesizers synthesizers)
@@ -452,7 +452,7 @@
(#try.Success file)
(do (try.with promise.monad)
[binary (!.use (:: file content) [])
- archive (promise@wrap (archive.import ///.version binary))]
+ archive (promise\wrap (archive.import ///.version binary))]
(..load-every-reserved-module host-environment system static import contexts archive))
(#try.Failure error)
diff --git a/stdlib/source/lux/tool/compiler/meta/io/context.lux b/stdlib/source/lux/tool/compiler/meta/io/context.lux
index c524f605f..572905325 100644
--- a/stdlib/source/lux/tool/compiler/meta/io/context.lux
+++ b/stdlib/source/lux/tool/compiler/meta/io/context.lux
@@ -10,10 +10,10 @@
[security
["!" capability]]
[concurrency
- ["." promise (#+ Promise) ("#@." monad)]]]
+ ["." promise (#+ Promise) ("#\." monad)]]]
[data
[binary (#+ Binary)]
- ["." text ("#@." hash)
+ ["." text ("#\." hash)
["%" format (#+ format)]
["." encoding]]
[collection
@@ -56,7 +56,7 @@
(Promise (Try [Path (File Promise)])))
(case contexts
#.Nil
- (promise@wrap (exception.throw ..cannot-find-module [module]))
+ (promise\wrap (exception.throw ..cannot-find-module [module]))
(#.Cons context contexts')
(do promise.monad
@@ -131,11 +131,11 @@
(#try.Success code)
(wrap {#////.module module
#////.file path
- #////.hash (text@hash code)
+ #////.hash (text\hash code)
#////.code code})
(#try.Failure _)
- (promise@wrap (exception.throw ..cannot-read-module [module])))))
+ (promise\wrap (exception.throw ..cannot-read-module [module])))))
(type: #export Enumeration
(Dictionary Path Binary))
@@ -167,9 +167,9 @@
(let [path (!.use (:: file path) [])]
(if (text.ends-with? ..lux-extension path)
(do !
- [path (promise@wrap (..clean-path system context path))
+ [path (promise\wrap (..clean-path system context path))
source-code (!.use (:: file content) [])]
- (promise@wrap
+ (promise\wrap
(dictionary.try-put path source-code enumeration)))
(wrap enumeration))))
enumeration
diff --git a/stdlib/source/lux/tool/compiler/meta/packager.lux b/stdlib/source/lux/tool/compiler/meta/packager.lux
index 732ae18c0..f2737e168 100644
--- a/stdlib/source/lux/tool/compiler/meta/packager.lux
+++ b/stdlib/source/lux/tool/compiler/meta/packager.lux
@@ -8,7 +8,7 @@
[binary (#+ Binary)]
[collection
["." row]
- ["." list ("#@." functor)]]]
+ ["." list ("#\." functor)]]]
[world
["." file (#+ Path)]]]
[program
@@ -33,10 +33,10 @@
(def: #export order
(-> dependency.Order Order)
- (list@map (function (_ [module [module-id [descriptor document]]])
+ (list\map (function (_ [module [module-id [descriptor document]]])
(|> descriptor
(get@ #descriptor.registry)
artifact.artifacts
row.to-list
- (list@map (|>> (get@ #artifact.id)))
+ (list\map (|>> (get@ #artifact.id)))
[module-id]))))
diff --git a/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux
index c807e5279..f5838cf80 100644
--- a/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux
+++ b/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux
@@ -18,7 +18,7 @@
["n" nat]]
[collection
["." row (#+ Row)]
- ["." list ("#@." functor fold)]]]
+ ["." list ("#\." functor)]]]
[target
[jvm
[encoding
@@ -147,7 +147,7 @@
(get@ #descriptor.registry)
artifact.artifacts
row.to-list
- (list@map (|>> (get@ #artifact.id)))
+ (list\map (|>> (get@ #artifact.id)))
[module-id])))))
(:: monad wrap))
#let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi-byte))
diff --git a/stdlib/source/lux/tool/compiler/meta/packager/script.lux b/stdlib/source/lux/tool/compiler/meta/packager/script.lux
index a80c28af1..b40873ace 100644
--- a/stdlib/source/lux/tool/compiler/meta/packager/script.lux
+++ b/stdlib/source/lux/tool/compiler/meta/packager/script.lux
@@ -14,7 +14,7 @@
["." encoding]]
[collection
["." row]
- ["." list ("#@." functor)]]]
+ ["." list ("#\." functor)]]]
[world
["." file (#+ File Directory)]]]
[program
@@ -76,12 +76,12 @@
[cache (!.use (:: file-system directory) [(get@ #static.target static)])
order (:: monad wrap (dependency.load-order $.key archive))]
(|> order
- (list@map (function (_ [module [module-id [descriptor document]]])
+ (list\map (function (_ [module [module-id [descriptor document]]])
[module-id
(|> descriptor
(get@ #descriptor.registry)
artifact.artifacts
row.to-list
- (list@map (|>> (get@ #artifact.id))))]))
+ (list\map (|>> (get@ #artifact.id))))]))
(monad.fold ! (..write-module monad file-system static sequence) header)
(:: ! map (|>> to-code encoding.to-utf8))))))
diff --git a/stdlib/source/lux/tool/compiler/phase.lux b/stdlib/source/lux/tool/compiler/phase.lux
index 68d6a4848..312428ff7 100644
--- a/stdlib/source/lux/tool/compiler/phase.lux
+++ b/stdlib/source/lux/tool/compiler/phase.lux
@@ -4,7 +4,7 @@
[monad (#+ Monad do)]]
[control
["." state]
- ["." try (#+ Try) ("#@." functor)]
+ ["." try (#+ Try) ("#\." functor)]
["ex" exception (#+ Exception exception:)]
["." io]
[parser
@@ -77,7 +77,7 @@
(def: #export (lift error)
(All [s a] (-> (Try a) (Operation s a)))
(function (_ state)
- (try@map (|>> [state]) error)))
+ (try\map (|>> [state]) error)))
(syntax: #export (assert exception message test)
(wrap (list (` (if (~ test)
diff --git a/stdlib/source/lux/type.lux b/stdlib/source/lux/type.lux
index 01b4bf05a..1d390b8b6 100644
--- a/stdlib/source/lux/type.lux
+++ b/stdlib/source/lux/type.lux
@@ -10,13 +10,13 @@
["<c>" code (#+ Parser)]]]
[data
["." maybe]
- ["." text ("#@." monoid equivalence)]
- ["." name ("#@." equivalence codec)]
+ ["." text ("#\." monoid equivalence)]
+ ["." name ("#\." equivalence codec)]
[number
- ["n" nat ("#@." decimal)]]
+ ["n" nat ("#\." decimal)]]
[collection
["." array]
- ["." list ("#@." functor monoid fold)]]]
+ ["." list ("#\." functor monoid fold)]]]
[macro
[syntax (#+ syntax:)]
["." code]]
@@ -54,7 +54,7 @@
(case type
(#.Apply arg func')
(let [[func args] (flatten-application func')]
- [func (list@compose args (list arg))])
+ [func (list\compose args (list arg))])
_
[type (list)]))
@@ -77,64 +77,64 @@
(-> Type Text)
(case type
(#.Primitive name params)
- ($_ text@compose
+ ($_ text\compose
"(primitive "
(text.enclose' text.double-quote name)
(|> params
- (list@map (|>> format (text@compose " ")))
- (list@fold (function.flip text@compose) ""))
+ (list\map (|>> format (text\compose " ")))
+ (list\fold (function.flip text\compose) ""))
")")
(^template [<tag> <open> <close> <flatten>]
[(<tag> _)
- ($_ text@compose <open>
+ ($_ text\compose <open>
(|> (<flatten> type)
- (list@map format)
+ (list\map format)
list.reverse
(list.interpose " ")
- (list@fold text@compose ""))
+ (list\fold text\compose ""))
<close>)])
([#.Sum "(| " ")" flatten-variant]
[#.Product "[" "]" flatten-tuple])
(#.Function input output)
(let [[ins out] (flatten-function type)]
- ($_ text@compose "(-> "
+ ($_ text\compose "(-> "
(|> ins
- (list@map format)
+ (list\map format)
list.reverse
(list.interpose " ")
- (list@fold text@compose ""))
+ (list\fold text\compose ""))
" " (format out) ")"))
(#.Parameter idx)
- (n@encode idx)
+ (n\encode idx)
(#.Var id)
- ($_ text@compose "⌈v:" (n@encode id) "⌋")
+ ($_ text\compose "⌈v:" (n\encode id) "⌋")
(#.Ex id)
- ($_ text@compose "⟨e:" (n@encode id) "⟩")
+ ($_ text\compose "⟨e:" (n\encode id) "⟩")
(#.Apply param fun)
(let [[type-func type-args] (flatten-application type)]
- ($_ text@compose "(" (format type-func) " " (|> type-args (list@map format) list.reverse (list.interpose " ") (list@fold text@compose "")) ")"))
+ ($_ text\compose "(" (format type-func) " " (|> type-args (list\map format) list.reverse (list.interpose " ") (list\fold text\compose "")) ")"))
(^template [<tag> <desc>]
[(<tag> env body)
- ($_ text@compose "(" <desc> " {" (|> env (list@map format) (text.join-with " ")) "} " (format body) ")")])
+ ($_ text\compose "(" <desc> " {" (|> env (list\map format) (text.join-with " ")) "} " (format body) ")")])
([#.UnivQ "All"]
[#.ExQ "Ex"])
(#.Named [module name] type)
- ($_ text@compose module "." name)
+ ($_ text\compose module "." name)
))
(def: (beta-reduce env type)
(-> (List Type) Type Type)
(case type
(#.Primitive name params)
- (#.Primitive name (list@map (beta-reduce env) params))
+ (#.Primitive name (list\map (beta-reduce env) params))
(^template [<tag>]
[(<tag> left right)
@@ -149,21 +149,21 @@
(<tag> env def)
_
- (<tag> (list@map (beta-reduce env) old-env) def))])
+ (<tag> (list\map (beta-reduce env) old-env) def))])
([#.UnivQ]
[#.ExQ])
(#.Parameter idx)
- (maybe.default (error! ($_ text@compose
+ (maybe.default (error! ($_ text\compose
"Unknown type parameter" text.new-line
- " Index: " (n@encode idx) text.new-line
+ " Index: " (n\encode idx) text.new-line
"Environment: " (|> env
list.enumeration
- (list@map (.function (_ [index type])
- ($_ text@compose
- (n@encode index)
+ (list\map (.function (_ [index type])
+ ($_ text\compose
+ (n\encode index)
" " (..format type))))
- (text.join-with (text@compose text.new-line " ")))))
+ (text.join-with (text\compose text.new-line " ")))))
(list.nth idx env))
_
@@ -177,9 +177,9 @@
(or (is? x y)
(case [x y]
[(#.Primitive xname xparams) (#.Primitive yname yparams)]
- (and (text@= xname yname)
+ (and (text\= xname yname)
(n.= (list.size yparams) (list.size xparams))
- (list@fold (.function (_ [x y] prev) (and prev (= x y)))
+ (list\fold (.function (_ [x y] prev) (and prev (= x y)))
#1
(list.zip/2 xparams yparams)))
@@ -194,7 +194,7 @@
(= xright yright))
[(#.Named xname xtype) (#.Named yname ytype)]
- (and (name@= xname yname)
+ (and (name\= xname yname)
(= xtype ytype))
(^template [<tag>]
@@ -206,7 +206,7 @@
[(#.ExQ xenv xbody) (#.ExQ yenv ybody)])
(and (n.= (list.size yenv) (list.size xenv))
(= xbody ybody)
- (list@fold (.function (_ [x y] prev) (and prev (= x y)))
+ (list\fold (.function (_ [x y] prev) (and prev (= x y)))
#1
(list.zip/2 xenv yenv)))
@@ -243,7 +243,7 @@
(case type
(#.Primitive name params)
(` (#.Primitive (~ (code.text name))
- (.list (~+ (list@map to-code params)))))
+ (.list (~+ (list\map to-code params)))))
(^template [<tag>]
[(<tag> idx)
@@ -261,7 +261,7 @@
(^template [<tag>]
[(<tag> env body)
- (` (<tag> (.list (~+ (list@map to-code env)))
+ (` (<tag> (.list (~+ (list\map to-code env)))
(~ (to-code body))))])
([#.UnivQ] [#.ExQ])
))
@@ -369,14 +369,14 @@
(do meta.monad
[location meta.location
valueT (meta.find-type valueN)
- #let [_ (log! ($_ text@compose
- (name@encode (name-of ..:log!)) " " (location.format location) text.new-line
+ #let [_ (log! ($_ text\compose
+ (name\encode (name-of ..:log!)) " " (location.format location) text.new-line
"Expression: " (case valueC
(#.Some valueC)
(code.format valueC)
#.None
- (name@encode valueN))
+ (name\encode valueN))
text.new-line
" Type: " (..format valueT)))]]
(wrap (list (code.identifier valueN))))
@@ -394,7 +394,7 @@
input
output
{value (<>.maybe <c>.any)})
- (let [casterC (` (: (All [(~+ (list@map code.local-identifier type-vars))]
+ (let [casterC (` (: (All [(~+ (list\map code.local-identifier type-vars))]
(-> (~ input) (~ output)))
(|>> :assume)))]
(case value
@@ -417,7 +417,7 @@
{exemplar typed}
{computation typed})
(meta.with-gensyms [g!_]
- (let [shareC (` (: (All [(~+ (list@map code.local-identifier type-vars))]
+ (let [shareC (` (: (All [(~+ (list\map code.local-identifier type-vars))]
(-> (~ (get@ #type exemplar))
(~ (get@ #type computation))))
(.function ((~ g!_) (~ g!_))
@@ -428,7 +428,7 @@
{exemplar typed}
{extraction <c>.any})
(wrap (list (` (:of ((~! :share)
- [(~+ (list@map code.local-identifier type-vars))]
+ [(~+ (list\map code.local-identifier type-vars))]
{(~ (get@ #type exemplar))
(~ (get@ #expression exemplar))}
{(~ extraction)
diff --git a/stdlib/source/lux/type/abstract.lux b/stdlib/source/lux/type/abstract.lux
index 46cbd641b..e89f33774 100644
--- a/stdlib/source/lux/type/abstract.lux
+++ b/stdlib/source/lux/type/abstract.lux
@@ -4,13 +4,13 @@
[monad (#+ Monad do)]]
[control
["." exception (#+ exception:)]
- ["<>" parser ("#@." monad)
+ ["<>" parser ("#\." monad)
["<c>" code (#+ Parser)]]]
[data
- ["." name ("#@." codec)]
- ["." text ("#@." equivalence monoid)]
+ ["." name ("#\." codec)]
+ ["." text ("#\." equivalence monoid)]
[collection
- ["." list ("#@." functor monoid)]]]
+ ["." list ("#\." functor monoid)]]]
["." meta]
[macro
["." code]
@@ -48,7 +48,7 @@
(loop [entries <source>]
(case entries
(#.Cons [head-name head] tail)
- (if (text@= <reference> head-name)
+ (if (text\= <reference> head-name)
<then>
(recur tail))
@@ -80,7 +80,7 @@
(case (case frame
(#.Some frame)
(list.find (function (_ [actual _])
- (text@= frame actual))
+ (text\= frame actual))
current-frames)
#.None
@@ -103,7 +103,7 @@
(loop [entries <source>]
(case entries
(#.Cons [head-name head] tail)
- (if (text@= <reference> head-name)
+ (if (text\= <reference> head-name)
(#.Cons [head-name <then>]
tail)
(#.Cons [head-name head]
@@ -172,7 +172,7 @@
(def: cast
(Parser [(Maybe Text) Code])
(<>.either (<>.and (<>.maybe <c>.local-identifier) <c>.any)
- (<>.and (<>@wrap #.None) <c>.any)))
+ (<>.and (<>\wrap #.None) <c>.any)))
(template [<name> <from> <to>]
[(syntax: #export (<name> {[frame value] ..cast})
@@ -187,15 +187,15 @@
(def: abstraction-type-name
(-> Name Text)
- (|>> name@encode
- ($_ text@compose
- (name@encode (name-of #..Abstraction))
+ (|>> name\encode
+ ($_ text\compose
+ (name\encode (name-of #..Abstraction))
" ")))
(def: representation-definition-name
(-> Text Text)
- (|>> ($_ text@compose
- (name@encode (name-of #Representation))
+ (|>> ($_ text\compose
+ (name\encode (name-of #Representation))
" ")))
(def: declaration
@@ -213,7 +213,7 @@
{primitives (<>.some <c>.any)})
(do meta.monad
[current-module meta.current-module-name
- #let [type-varsC (list@map code.local-identifier type-vars)
+ #let [type-varsC (list\map code.local-identifier type-vars)
abstraction-declaration (` ((~ (code.local-identifier name)) (~+ type-varsC)))
representation-declaration (` ((~ (code.local-identifier (representation-definition-name name)))
(~+ type-varsC)))]
@@ -227,7 +227,7 @@
[(~+ type-varsC)])))
(` (type: (~ representation-declaration)
(~ representation-type)))
- ($_ list@compose
+ ($_ list\compose
primitives
(list (` ((~! ..pop!)))))))))
diff --git a/stdlib/source/lux/type/check.lux b/stdlib/source/lux/type/check.lux
index 2d4ea30c9..28c73b124 100644
--- a/stdlib/source/lux/type/check.lux
+++ b/stdlib/source/lux/type/check.lux
@@ -11,26 +11,26 @@
["." maybe]
["." product]
[number
- ["n" nat ("#@." decimal)]]
- ["." text ("#@." monoid equivalence)]
+ ["n" nat ("#\." decimal)]]
+ ["." text ("#\." monoid equivalence)]
[collection
["." list]
["." set (#+ Set)]]]]
- ["." // ("#@." equivalence)])
+ ["." // ("#\." equivalence)])
(template: (!n/= reference subject)
("lux i64 =" reference subject))
-(template: (!text@= reference subject)
+(template: (!text\= reference subject)
("lux text =" reference subject))
(exception: #export (unknown-type-var {id Nat})
(exception.report
- ["ID" (n@encode id)]))
+ ["ID" (n\encode id)]))
(exception: #export (unbound-type-var {id Nat})
(exception.report
- ["ID" (n@encode id)]))
+ ["ID" (n\encode id)]))
(exception: #export (invalid-type-application {funcT Type} {argT Type})
(exception.report
@@ -39,7 +39,7 @@
(exception: #export (cannot-rebind-var {id Nat} {type Type} {bound Type})
(exception.report
- ["Var" (n@encode id)]
+ ["Var" (n\encode id)]
["Wanted Type" (//.format type)]
["Current Type" (//.format bound)]))
@@ -113,7 +113,7 @@
)))
)
-(open: "check@." ..monad)
+(open: "check\." ..monad)
(def: (var::new id plist)
(-> Var Type-Vars Type-Vars)
@@ -276,7 +276,7 @@
_
(case (//.apply (list argT) funcT)
(#.Some output)
- (check@wrap output)
+ (check\wrap output)
_
(throw ..invalid-type-application [funcT argT]))))
@@ -337,8 +337,8 @@
(def: (assumed? [e a] assumptions)
(-> Assumption (List Assumption) Bit)
(list.any? (function (_ [e' a'])
- (and (//@= e e')
- (//@= a a')))
+ (and (//\= e e')
+ (//\= a a')))
assumptions))
(def: (assume! assumption assumptions)
@@ -381,7 +381,7 @@
(def: (check-vars check' assumptions idE idA)
(-> (Checker Type) (Checker Var))
(if (!n/= idE idA)
- (check@wrap assumptions)
+ (check\wrap assumptions)
(do {! ..monad}
[ebound (attempt (peek idE))
abound (attempt (peek idA))]
@@ -540,7 +540,7 @@
{#.doc "Type-check to ensure that the 'expected' type subsumes the 'actual' type."}
(Checker Type)
(if (is? expected actual)
- (check@wrap assumptions)
+ (check\wrap assumptions)
(with type-check-failed [expected actual]
(case [expected actual]
[(#.Var idE) (#.Var idA)]
@@ -548,13 +548,13 @@
[(#.Var id) _]
(if-bind id actual
- (check@wrap assumptions)
+ (check\wrap assumptions)
(function (_ bound)
(check' assumptions bound actual)))
[_ (#.Var id)]
(if-bind id expected
- (check@wrap assumptions)
+ (check\wrap assumptions)
(function (_ bound)
(check' assumptions expected bound)))
@@ -569,7 +569,7 @@
[(#.Apply A F) _]
(let [new-assumption [expected actual]]
(if (assumed? new-assumption assumptions)
- (check@wrap assumptions)
+ (check\wrap assumptions)
(do ..monad
[expected' (apply-type! F A)]
(check' (assume! new-assumption assumptions) expected' actual))))
@@ -600,13 +600,13 @@
[#.ExQ ..existential])
[(#.Primitive e-name e-params) (#.Primitive a-name a-params)]
- (if (!text@= e-name a-name)
+ (if (!text\= e-name a-name)
(loop [assumptions assumptions
e-params e-params
a-params a-params]
(case [e-params a-params]
[#.Nil #.Nil]
- (check@wrap assumptions)
+ (check\wrap assumptions)
[(#.Cons e-head e-tail) (#.Cons a-head a-tail)]
(do ..monad
@@ -632,7 +632,7 @@
[(#.Ex e!id) (#.Ex a!id)]
(if (!n/= e!id a!id)
- (check@wrap assumptions)
+ (check\wrap assumptions)
(fail ""))
[(#.Named _ ?etype) _]
@@ -670,17 +670,17 @@
(#.Primitive name paramsT+)
(|> paramsT+
(monad.map ..monad clean)
- (check@map (|>> (#.Primitive name))))
+ (check\map (|>> (#.Primitive name))))
(^or (#.Parameter _) (#.Ex _) (#.Named _))
- (check@wrap inputT)
+ (check\wrap inputT)
(^template [<tag>]
[(<tag> leftT rightT)
(do ..monad
[leftT' (clean leftT)]
(|> (clean rightT)
- (check@map (|>> (<tag> leftT')))))])
+ (check\map (|>> (<tag> leftT')))))])
([#.Sum] [#.Product] [#.Function] [#.Apply])
(#.Var id)
diff --git a/stdlib/source/lux/type/implicit.lux b/stdlib/source/lux/type/implicit.lux
index afd1f68c6..cf2068839 100644
--- a/stdlib/source/lux/type/implicit.lux
+++ b/stdlib/source/lux/type/implicit.lux
@@ -12,10 +12,10 @@
["." maybe]
["." number
["n" nat]]
- ["." text ("#@." equivalence)
+ ["." text ("#\." equivalence)
["%" format (#+ format)]]
[collection
- ["." list ("#@." monad fold)]
+ ["." list ("#\." monad fold)]
["dict" dictionary (#+ Dictionary)]]]
["." meta]
[macro
@@ -93,8 +93,8 @@
[this-module-name meta.current-module-name
imp-mods (meta.imported-modules this-module-name)
tag-lists (monad.map ! meta.tag-lists imp-mods)
- #let [tag-lists (|> tag-lists list@join (list@map product.left) list@join)
- candidates (list.filter (|>> product.right (text@= simple-name))
+ #let [tag-lists (|> tag-lists list\join (list\map product.left) list\join)
+ candidates (list.filter (|>> product.right (text\= simple-name))
tag-lists)]]
(case candidates
#.Nil
@@ -121,7 +121,7 @@
(do list.monad
[[name [exported? def-type def-anns def-value]] constants]
(if (and (annotation.structure? def-anns)
- (or (text@= target-module source-module)
+ (or (text\= target-module source-module)
exported?))
(list [[source-module name] def-type])
(list))))
@@ -130,14 +130,14 @@
(Meta (List [Name Type]))
(do meta.monad
[local-batches meta.locals
- #let [total-locals (list@fold (function (_ [name type] table)
+ #let [total-locals (list\fold (function (_ [name type] table)
(try.default table (dict.try-put name type table)))
(: (Dictionary Text Type)
(dict.new text.hash))
- (list@join local-batches))]]
+ (list\join local-batches))]]
(wrap (|> total-locals
dict.entries
- (list@map (function (_ [name type]) [["" name] type]))))))
+ (list\map (function (_ [name type]) [["" name] type]))))))
(def: local-structs
(Meta (List [Name Type]))
@@ -155,7 +155,7 @@
(:: ! map (prepare-definitions imp-mod this-module-name)
(meta.definitions imp-mod)))
imp-mods)]
- (wrap (list@join export-batches))))
+ (wrap (list\join export-batches))))
(def: (apply-function-type func arg)
(-> Type Type (Check Type))
@@ -211,7 +211,7 @@
(do meta.monad
[compiler meta.get-compiler]
(case (|> alts
- (list@map (function (_ [alt-name alt-type])
+ (list\map (function (_ [alt-name alt-type])
(case (check.run context
(do {! check.monad}
[[tvars alt-type] (concrete-type alt-type)
@@ -225,7 +225,7 @@
(#.Right =deps)
(list [alt-name =deps]))))
- list@join)
+ list\join)
#.Nil
(meta.fail (format "No candidates for provisioning: " (%.type dep)))
@@ -260,7 +260,7 @@
[compiler meta.get-compiler
context meta.type-context]
(case (|> alts
- (list@map (function (_ [alt-name alt-type])
+ (list\map (function (_ [alt-name alt-type])
(case (check.run context
(do {! check.monad}
[[tvars alt-type] (concrete-type alt-type)
@@ -276,7 +276,7 @@
(#.Right =deps)
(list [alt-name =deps]))))
- list@join)
+ list\join)
#.Nil
(meta.fail (format "No alternatives for " (%.type (type.function input-types output-type))))
@@ -311,7 +311,7 @@
(code.identifier constructor)
_
- (` ((~ (code.identifier constructor)) (~+ (list@map instance$ dependencies))))))
+ (` ((~ (code.identifier constructor)) (~+ (list\map instance$ dependencies))))))
(syntax: #export (:::
{member s.identifier}
@@ -354,19 +354,19 @@
(#.Cons chosen #.Nil)
(wrap (list (` (:: (~ (instance$ chosen))
(~ (code.local-identifier (product.right member)))
- (~+ (list@map code.identifier args))))))
+ (~+ (list\map code.identifier args))))))
_
(meta.fail (format "Too many options available: "
(|> chosen-ones
- (list@map (|>> product.left %.name))
+ (list\map (|>> product.left %.name))
(text.join-with ", "))
" --- for type: " (%.type sig-type)))))
(#.Right [args _])
(do {! meta.monad}
[labels (|> (meta.gensym "") (list.repeat (list.size args)) (monad.seq !))]
- (wrap (list (` (let [(~+ (|> (list.zip/2 labels args) (list@map join-pair) list@join))]
+ (wrap (list (` (let [(~+ (|> (list.zip/2 labels args) (list\map join-pair) list\join))]
(..::: (~ (code.identifier member)) (~+ labels)))))))
))
@@ -384,14 +384,14 @@
(do meta.monad
[g!implicit+ (implicit-bindings (list.size structures))]
(wrap (list (` (let [(~+ (|> (list.zip/2 g!implicit+ structures)
- (list@map (function (_ [g!implicit structure])
+ (list\map (function (_ [g!implicit structure])
(list g!implicit structure)))
- list@join))]
+ list\join))]
(~ body)))))))
(syntax: #export (implicit: {structures ..implicits})
(do meta.monad
[g!implicit+ (implicit-bindings (list.size structures))]
(wrap (|> (list.zip/2 g!implicit+ structures)
- (list@map (function (_ [g!implicit structure])
+ (list\map (function (_ [g!implicit structure])
(` (def: (~ g!implicit) (~ structure)))))))))
diff --git a/stdlib/source/lux/type/resource.lux b/stdlib/source/lux/type/resource.lux
index 8b87ef50b..60698b85f 100644
--- a/stdlib/source/lux/type/resource.lux
+++ b/stdlib/source/lux/type/resource.lux
@@ -21,7 +21,7 @@
[collection
["." set]
["." row (#+ Row)]
- ["." list ("#@." functor fold)]]]
+ ["." list ("#\." functor fold)]]]
["." meta]
[macro
[syntax (#+ syntax:)]]
@@ -162,7 +162,7 @@
(#.Cons head tail)
(do {! meta.monad}
- [#let [max-idx (list@fold n.max head tail)]
+ [#let [max-idx (list\fold n.max head tail)]
g!inputs (<| (monad.seq !) (list.repeat (inc max-idx)) (meta.gensym "input"))
#let [g!outputs (|> (monad.fold maybe.monad
(function (_ from to)
@@ -173,8 +173,8 @@
swaps)
maybe.assume
row.to-list)
- g!inputsT+ (list@map (|>> (~) ..CK (`)) g!inputs)
- g!outputsT+ (list@map (|>> (~) ..CK (`)) g!outputs)]]
+ g!inputsT+ (list\map (|>> (~) ..CK (`)) g!inputs)
+ g!outputsT+ (list\map (|>> (~) ..CK (`)) g!outputs)]]
(wrap (list (` (: (All [(~+ g!inputs) (~ g!context)]
(Procedure (~! <m>)
[(~+ g!inputsT+) (~ g!context)]