aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/type/implicit.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/type/implicit.lux40
1 files changed, 20 insertions, 20 deletions
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)))))))))