aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-30 01:12:05 -0400
committerEduardo Julian2021-07-30 01:12:05 -0400
commit9f039e8a0a09e0278547d697efa018cd3fd68672 (patch)
tree0b2298edfae39efa7195fc5152d267cc25dd7fc1 /stdlib/source/library/lux.lux
parent54b28c1caeda08965c258411a32229be1766d47f (diff)
More renamings.
Diffstat (limited to 'stdlib/source/library/lux.lux')
-rw-r--r--stdlib/source/library/lux.lux42
1 files changed, 22 insertions, 20 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index 9bf50bba5..84d33d03b 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -63,7 +63,7 @@
(2 #0 (4 #0 1)
(9 #0 (4 #0 1) (4 #0 0))))))
[dummy_location
- (9 #1 (0 #1 [[dummy_location (7 #0 ["library/lux" "type-args"])]
+ (9 #1 (0 #1 [[dummy_location (7 #0 ["library/lux" "type_args"])]
[dummy_location (9 #0 (0 #1 [dummy_location (5 #0 "a")] (0 #0)))]]
(0 #1 [[dummy_location (7 #0 ["library/lux" "doc"])]
[dummy_location (5 #0 "A potentially empty list of values.")]]
@@ -167,7 +167,7 @@
## "lux.Some"
(4 #0 1))))
[dummy_location
- (9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "type-args"])]
+ (9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "type_args"])]
[dummy_location (9 #0 (#Item [dummy_location (5 #0 "a")] #End))]]
(#Item [[dummy_location (7 #0 ["library/lux" "doc"])]
[dummy_location (5 #0 "A potentially missing value.")]]
@@ -223,7 +223,7 @@
[dummy_location
(9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "doc"])]
[dummy_location (5 #0 "This type represents the data-structures that are used to specify types themselves.")]]
- (#Item [[dummy_location (7 #0 ["library/lux" "type-rec?"])]
+ (#Item [[dummy_location (7 #0 ["library/lux" "type_rec?"])]
[dummy_location (0 #0 #1)]]
#End)))]
["Primitive" "Sum" "Product" "Function" "Parameter" "Var" "Ex" "UnivQ" "ExQ" "Apply" "Named"]
@@ -255,7 +255,7 @@
[dummy_location
(9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "doc"])]
[dummy_location (5 #0 "The type of things that can be annotated with meta-data of arbitrary types.")]]
- (#Item [[dummy_location (7 #0 ["library/lux" "type-args"])]
+ (#Item [[dummy_location (7 #0 ["library/lux" "type_args"])]
[dummy_location (9 #0 (#Item [dummy_location (5 #0 "m")] (#Item [dummy_location (5 #0 "v")] #End)))]]
#End)))]
["meta" "datum"]
@@ -307,7 +307,7 @@
(#Parameter 0))
(#Parameter 1)))))
[dummy_location
- (9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "type-args"])]
+ (9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "type_args"])]
[dummy_location (9 #0 (#Item [dummy_location (5 #0 "w")] #End))]]
#End))]
["Bit" "Nat" "Int" "Rev" "Frac" "Text" "Identifier" "Tag" "Form" "Tuple" "Record"]
@@ -460,7 +460,7 @@
(#Apply (#Product (#Parameter 3)
(#Parameter 1))
List)))))
- (record$ (#Item [(tag$ ["library/lux" "type-args"])
+ (record$ (#Item [(tag$ ["library/lux" "type_args"])
(tuple$ (#Item (text$ "k") (#Item (text$ "v") #End)))]
#End))
["counter" "mappings"]
@@ -515,7 +515,7 @@
(#Parameter 3)
## "lux.Right"
(#Parameter 1)))))
- (record$ (#Item [(tag$ ["library/lux" "type-args"])
+ (record$ (#Item [(tag$ ["library/lux" "type_args"])
(tuple$ (#Item (text$ "l") (#Item (text$ "r") #End)))]
(#Item [(tag$ ["library/lux" "doc"])
(text$ "A choice between two values of different types.")]
@@ -709,7 +709,7 @@
(text$ ("lux text concat"
("lux text concat" "Computations that can have access to the state of the compiler." __paragraph)
"These computations may fail, or modify the state of the compiler."))]
- (#Item [(tag$ ["library/lux" "type-args"])
+ (#Item [(tag$ ["library/lux" "type_args"])
(tuple$ (#Item (text$ "a") #End))]
#End)))
#1)
@@ -2985,7 +2985,7 @@
meta
_
- (` (#.Item [[(~ location_code) (#.Tag ["library/lux" "func-args"])]
+ (` (#.Item [[(~ location_code) (#.Tag ["library/lux" "func_args"])]
[(~ location_code) (#.Tuple (.list (~+ (list\map (function (_ arg)
(` [(~ location_code) (#.Text (~ (text$ (code\encode arg))))]))
args))))]]
@@ -2993,7 +2993,7 @@
(def:' (with_type_args args)
(-> (List Code) Code)
- (` {#.type-args [(~+ (list\map (function (_ arg) (text$ (code\encode arg)))
+ (` {#.type_args [(~+ (list\map (function (_ arg) (text$ (code\encode arg)))
args))]}))
(def:' (export^ tokens)
@@ -3590,7 +3590,9 @@
#None
(failure "Wrong syntax for implementation:"))))
-(def: (function\identity x) (All [a] (-> a a)) x)
+(def: (function\identity value)
+ (All [a] (-> a a))
+ value)
(macro: #export (type: tokens)
{#.doc (text$ ($_ "lux text concat"
@@ -3649,7 +3651,7 @@
(#Some (` (.All (~ type_name) [(~+ args)] (~ type)))))))
total_meta (let [meta (process_def_meta meta)
meta (if rec?
- (` (#.Item (~ (flag_meta "type-rec?")) (~ meta)))
+ (` (#.Item (~ (flag_meta "type_rec?")) (~ meta)))
meta)]
(` [(~ location_code)
(#.Record (~ meta))]))]
@@ -4045,7 +4047,7 @@
cases)]
output))
-(def: (try_both f x1 x2)
+(def: (on_either f x1 x2)
(All [a b]
(-> (-> a (Maybe b)) a a (Maybe b)))
(case (f x1)
@@ -4066,13 +4068,13 @@
#inner _
#locals {#counter _ #mappings locals}
#captured {#counter _ #mappings closure}}
- (try_both (find (: (-> [Text [Type Any]] (Maybe Type))
- (function (_ [bname [type _]])
- (if (text\= name bname)
- (#Some type)
- #None))))
- (: (List [Text [Type Any]]) locals)
- (: (List [Text [Type Any]]) closure)))))
+ (on_either (find (: (-> [Text [Type Any]] (Maybe Type))
+ (function (_ [bname [type _]])
+ (if (text\= name bname)
+ (#Some type)
+ #None))))
+ (: (List [Text [Type Any]]) locals)
+ (: (List [Text [Type Any]]) closure)))))
scopes)))
(def: (definition_type name state)