From 4051a1cbe0999ee22bc395b059ea1556bcc002a0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 1 Sep 2021 01:01:22 -0400 Subject: Updates to the JS compiler. --- stdlib/source/library/lux.lux | 48 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 40 deletions(-) (limited to 'stdlib/source/library/lux.lux') diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 804c27ee5..d717434be 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -50,9 +50,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"])] - [dummy_location (9 #0 (0 #1 [dummy_location (5 #0 "a")] (0 #0)))]] - (0 #0)))] + (9 #1 (0 #0))] ("End" "Item") #1) @@ -132,9 +130,7 @@ ... "lux.Some" (4 #0 1)))) [dummy_location - (9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "type_args"])] - [dummy_location (9 #0 (#Item [dummy_location (5 #0 "a")] #End))]] - #End))] + (9 #1 #End)] ("None" "Some") #1) @@ -221,9 +217,7 @@ (#Product (#Parameter 3) (#Parameter 1))))) [dummy_location - (9 #1 (#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))] + (9 #1 #End)] ["meta" "datum"] #1) @@ -273,9 +267,7 @@ (#Parameter 0)) (#Parameter 1))))) [dummy_location - (9 #1 (#Item [[dummy_location (7 #0 ["library/lux" "type_args"])] - [dummy_location (9 #0 (#Item [dummy_location (5 #0 "w")] #End))]] - #End))] + (9 #1 #End)] ("Bit" "Nat" "Int" "Rev" "Frac" "Text" "Identifier" "Tag" "Form" "Tuple" "Record") #1) @@ -462,9 +454,7 @@ (#Apply (#Product (#Parameter 3) (#Parameter 1)) List))))) - (record$ (#Item [(tag$ ["library/lux" "type_args"]) - (tuple$ (#Item (text$ "k") (#Item (text$ "v") #End)))] - #End)) + (record$ #End) ["counter" "mappings"] .public) @@ -517,9 +507,7 @@ (#Parameter 3) ... "lux.Right" (#Parameter 1))))) - (record$ (#Item [(tag$ ["library/lux" "type_args"]) - (tuple$ (#Item (text$ "l") (#Item (text$ "r") #End)))] - #End)) + (record$ #End) ("Left" "Right") .public) @@ -707,9 +695,7 @@ (#Function Lux (#Apply (#Product Lux (#Parameter 1)) (#Apply Text Either)))))) - (record$ (#Item [(tag$ ["library/lux" "type_args"]) - (tuple$ (#Item (text$ "a") #End))] - #End)) + (record$ #End) .public) ... (type: .public Macro' @@ -2794,24 +2780,6 @@ (~ (definition_annotation_value v))]))) kvs))) -(def:' .private (with_function_parameters parameters meta) - (-> (List Code) Code Code) - (case parameters - #End - meta - - _ - (` (#.Item [[(~ location_code) (#.Tag ["library/lux" "func_args"])] - [(~ location_code) (#.Tuple (.list (~+ (list\each (function (_ parameter) - (` [(~ location_code) (#.Text (~ (text$ (code\encoded parameter))))])) - parameters))))]] - (~ meta))))) - -(def:' .private (with_type_args args) - (-> (List Code) Code) - (` {#.type_args [(~+ (list\each (function (_ arg) (text$ (code\encoded arg))) - args))]})) - (def:' .private (endP tokens) (-> (List Code) (Maybe Any)) (case tokens @@ -2998,7 +2966,7 @@ (in_meta (list (` ("lux def" (~ (..local_identifier$ name)) (~ body) [(~ location_code) - (#.Record (~ (with_function_parameters parameters =annotations)))] + (#.Record (~ =annotations))] (~ export_policy)))))) #None -- cgit v1.2.3