From f71ec9cb4ead1e7f9573a37686c87e6a9206a415 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 10 Sep 2021 02:27:34 -0400 Subject: Fixed the indentation of variants. --- stdlib/source/library/lux.lux | 812 +++++++++++++++++++++--------------------- 1 file changed, 406 insertions(+), 406 deletions(-) (limited to 'stdlib/source/library/lux.lux') diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 7d94363f3..aa4d89179 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -19,10 +19,10 @@ ("lux def" Any ("lux type check type" {9 #1 - [..prelude_module "Any"] - {8 #0 - {0 #0} - {4 #0 1}}}) + [..prelude_module "Any"] + {8 #0 + {0 #0} + {4 #0 1}}}) #1) ... (type: .public Nothing @@ -30,10 +30,10 @@ ("lux def" Nothing ("lux type check type" {9 #1 - [..prelude_module "Nothing"] - {7 #0 - {0 #0} - {4 #0 1}}}) + [..prelude_module "Nothing"] + {7 #0 + {0 #0} + {4 #0 1}}}) #1) ... (type: .public (List a) @@ -41,77 +41,77 @@ ... {#Item a (List a)}) ("lux def type tagged" List {9 #1 - [..prelude_module "List"] - {7 #0 - {0 #0} - {1 #0 - ... End - Any - ... Item - {2 #0 - {4 #0 1} - {9 #0 - {4 #0 1} - {4 #0 0}}}}}} + [..prelude_module "List"] + {7 #0 + {0 #0} + {1 #0 + ... End + Any + ... Item + {2 #0 + {4 #0 1} + {9 #0 + {4 #0 1} + {4 #0 0}}}}}} {"End" "Item"} #1) ("lux def" Bit ("lux type check type" {9 #1 - [..prelude_module "Bit"] - {0 #0 "#Bit" #End}}) + [..prelude_module "Bit"] + {0 #0 "#Bit" #End}}) #1) ("lux def" I64 ("lux type check type" {9 #1 - [..prelude_module "I64"] - {7 #0 - {0 #0} - {0 #0 "#I64" {#Item {4 #0 1} #End}}}}) + [..prelude_module "I64"] + {7 #0 + {0 #0} + {0 #0 "#I64" {#Item {4 #0 1} #End}}}}) #1) ("lux def" Nat ("lux type check type" {9 #1 - [..prelude_module "Nat"] - {0 #0 "#I64" {#Item {0 #0 "#Nat" #End} #End}}}) + [..prelude_module "Nat"] + {0 #0 "#I64" {#Item {0 #0 "#Nat" #End} #End}}}) #1) ("lux def" Int ("lux type check type" {9 #1 - [..prelude_module "Int"] - {0 #0 "#I64" {#Item {0 #0 "#Int" #End} #End}}}) + [..prelude_module "Int"] + {0 #0 "#I64" {#Item {0 #0 "#Int" #End} #End}}}) #1) ("lux def" Rev ("lux type check type" {9 #1 - [..prelude_module "Rev"] - {0 #0 "#I64" {#Item {0 #0 "#Rev" #End} #End}}}) + [..prelude_module "Rev"] + {0 #0 "#I64" {#Item {0 #0 "#Rev" #End} #End}}}) #1) ("lux def" Frac ("lux type check type" {9 #1 - [..prelude_module "Frac"] - {0 #0 "#Frac" #End}}) + [..prelude_module "Frac"] + {0 #0 "#Frac" #End}}) #1) ("lux def" Text ("lux type check type" {9 #1 - [..prelude_module "Text"] - {0 #0 "#Text" #End}}) + [..prelude_module "Text"] + {0 #0 "#Text" #End}}) #1) ("lux def" Name ("lux type check type" {9 #1 - [..prelude_module "Name"] - {2 #0 Text Text}}) + [..prelude_module "Name"] + {2 #0 Text Text}}) #1) ... (type: .public (Maybe a) @@ -119,14 +119,14 @@ ... {#Some a}) ("lux def type tagged" Maybe {9 #1 - [..prelude_module "Maybe"] - {7 #0 - #End - {1 #0 - ... None - Any - ... Some - {4 #0 1}}}} + [..prelude_module "Maybe"] + {7 #0 + #End + {1 #0 + ... None + Any + ... Some + {4 #0 1}}}} {"None" "Some"} #1) @@ -146,48 +146,48 @@ ... {#Named Name Type}))) ("lux def type tagged" Type {9 #1 [..prelude_module "Type"] - ({Type - ({Type_List - ({Type_Pair - {9 #0 - {0 #0 ["" #End]} - {7 #0 - #End - {1 #0 - ... Primitive - {2 #0 Text Type_List} - {1 #0 - ... Sum - Type_Pair - {1 #0 - ... Product - Type_Pair - {1 #0 - ... Function - Type_Pair - {1 #0 - ... Parameter - Nat - {1 #0 - ... Var - Nat + ({Type + ({Type_List + ({Type_Pair + {9 #0 + {0 #0 ["" #End]} + {7 #0 + #End {1 #0 - ... Ex - Nat - {1 #0 - ... UnivQ - {2 #0 Type_List Type} - {1 #0 - ... ExQ - {2 #0 Type_List Type} + ... Primitive + {2 #0 Text Type_List} {1 #0 - ... Apply - Type_Pair - ... Named - {2 #0 Name Type}}}}}}}}}}}}}} - ("lux type check type" {2 #0 Type Type}))} - ("lux type check type" {9 #0 Type List}))} - ("lux type check type" {9 #0 {0 #0 ["" #End]} {4 #0 0}}))} + ... Sum + Type_Pair + {1 #0 + ... Product + Type_Pair + {1 #0 + ... Function + Type_Pair + {1 #0 + ... Parameter + Nat + {1 #0 + ... Var + Nat + {1 #0 + ... Ex + Nat + {1 #0 + ... UnivQ + {2 #0 Type_List Type} + {1 #0 + ... ExQ + {2 #0 Type_List Type} + {1 #0 + ... Apply + Type_Pair + ... Named + {2 #0 Name Type}}}}}}}}}}}}}} + ("lux type check type" {2 #0 Type Type}))} + ("lux type check type" {9 #0 Type List}))} + ("lux type check type" {9 #0 {0 #0 ["" #End]} {4 #0 0}}))} {"Primitive" "Sum" "Product" "Function" "Parameter" "Var" "Ex" "UnivQ" "ExQ" "Apply" "Named"} #1) @@ -198,7 +198,7 @@ ... #column Nat])) ("lux def type tagged" Location {#Named [..prelude_module "Location"] - {#Product Text {#Product Nat Nat}}} + {#Product Text {#Product Nat Nat}}} ["module" "line" "column"] #1) @@ -208,11 +208,11 @@ ... #datum v])) ("lux def type tagged" Ann {#Named [..prelude_module "Ann"] - {#UnivQ #End - {#UnivQ #End - {#Product - {#Parameter 3} - {#Parameter 1}}}}} + {#UnivQ #End + {#UnivQ #End + {#Product + {#Parameter 3} + {#Parameter 1}}}}} ["meta" "datum"] #1) @@ -230,47 +230,47 @@ ... {#Tuple (List (w (Code' w)))}) ("lux def type tagged" Code' {#Named [..prelude_module "Code'"] - ({Code - ({Code_List - {#UnivQ #End - {#Sum - ... Bit - Bit - {#Sum - ... Nat - Nat - {#Sum - ... Int - Int - {#Sum - ... Rev - Rev - {#Sum - ... Frac - Frac - {#Sum - ... Text - Text - {#Sum - ... Identifier - Name - {#Sum - ... Tag - Name - {#Sum - ... Form - Code_List - {#Sum - ... Variant - Code_List - ... Tuple - Code_List - }}}}}}}}}} - }} - ("lux type check type" {#Apply Code List}))} - ("lux type check type" {#Apply {#Apply {#Parameter 1} - {#Parameter 0}} - {#Parameter 1}}))} + ({Code + ({Code_List + {#UnivQ #End + {#Sum + ... Bit + Bit + {#Sum + ... Nat + Nat + {#Sum + ... Int + Int + {#Sum + ... Rev + Rev + {#Sum + ... Frac + Frac + {#Sum + ... Text + Text + {#Sum + ... Identifier + Name + {#Sum + ... Tag + Name + {#Sum + ... Form + Code_List + {#Sum + ... Variant + Code_List + ... Tuple + Code_List + }}}}}}}}}} + }} + ("lux type check type" {#Apply Code List}))} + ("lux type check type" {#Apply {#Apply {#Parameter 1} + {#Parameter 0}} + {#Parameter 1}}))} {"Bit" "Nat" "Int" "Rev" "Frac" "Text" "Identifier" "Tag" "Form" "Variant" "Tuple"} #1) @@ -279,9 +279,9 @@ ("lux def" Code ("lux type check type" {#Named [..prelude_module "Code"] - ({w - {#Apply {#Apply w Code'} w}} - ("lux type check type" {#Apply Location Ann}))}) + ({w + {#Apply {#Apply w Code'} w}} + ("lux type check type" {#Apply Location Ann}))}) #1) ("lux def" private @@ -303,7 +303,7 @@ ("lux def" _ann ("lux type check" {#Function {#Apply {#Apply Location Ann} Code'} - Code} + Code} ([_ data] [dummy_location data])) #0) @@ -378,7 +378,7 @@ ("lux def" Definition ("lux type check type" {#Named [..prelude_module "Definition"] - {#Product Bit {#Product Type Any}}}) + {#Product Bit {#Product Type Any}}}) .public) ... (type: .public Alias @@ -386,7 +386,7 @@ ("lux def" Alias ("lux type check type" {#Named [..prelude_module "Alias"] - Name}) + Name}) .public) ... (type: .public Label @@ -394,7 +394,7 @@ ("lux def" Label ("lux type check type" {#Named [..prelude_module "Label"] - {#Product Bit {#Product Type {#Product {#Apply Text List} Nat}}}}) + {#Product Bit {#Product Type {#Product {#Apply Text List} Nat}}}}) .public) ... (type: .public Global @@ -406,13 +406,13 @@ ... {#Alias Alias})) ("lux def type tagged" Global {#Named [..prelude_module "Global"] - {#Sum Definition - {#Sum ({labels - {#Product Bit {#Product Type {#Sum labels labels}}}} - {#Product Text {#Apply Text List}}) - {#Sum Label - {#Sum Label - Alias}}}}} + {#Sum Definition + {#Sum ({labels + {#Product Bit {#Product Type {#Sum labels labels}}}} + {#Product Text {#Apply Text List}}) + {#Sum Label + {#Sum Label + Alias}}}}} {"Definition" "Type" "Label" "Slot" "Alias"} .public) @@ -422,15 +422,15 @@ ... #mappings (List [k v])])) ("lux def type tagged" Bindings {#Named [..prelude_module "Bindings"] - {#UnivQ #End - {#UnivQ #End - {#Product - ... counter - Nat - ... mappings - {#Apply {#Product {#Parameter 3} - {#Parameter 1}} - List}}}}} + {#UnivQ #End + {#UnivQ #End + {#Product + ... counter + Nat + ... mappings + {#Apply {#Product {#Parameter 3} + {#Parameter 1}} + List}}}}} ["counter" "mappings"] .public) @@ -439,10 +439,10 @@ ... {#Captured Nat}) ("lux def type tagged" Ref {#Named [..prelude_module "Ref"] - {#Sum ... Local - Nat - ... Captured - Nat}} + {#Sum ... Local + Nat + ... Captured + Nat}} {"Local" "Captured"} .public) @@ -454,14 +454,14 @@ ... #captured (Bindings Text [Type Ref])])) ("lux def type tagged" Scope {#Named [..prelude_module "Scope"] - {#Product ... name - {#Apply Text List} - {#Product ... inner - Nat - {#Product ... locals - {#Apply {#Product Type Nat} {#Apply Text Bindings}} - ... captured - {#Apply {#Product Type Ref} {#Apply Text Bindings}}}}}} + {#Product ... name + {#Apply Text List} + {#Product ... inner + Nat + {#Product ... locals + {#Apply {#Product Type Nat} {#Apply Text Bindings}} + ... captured + {#Apply {#Product Type Ref} {#Apply Text Bindings}}}}}} ["name" "inner" "locals" "captured"] .public) @@ -475,13 +475,13 @@ ... {#Right r}) ("lux def type tagged" Either {#Named [..prelude_module "Either"] - {#UnivQ #End - {#UnivQ #End - {#Sum - ... Left - {#Parameter 3} - ... Right - {#Parameter 1}}}}} + {#UnivQ #End + {#UnivQ #End + {#Sum + ... Left + {#Parameter 3} + ... Right + {#Parameter 1}}}}} {"Left" "Right"} .public) @@ -490,7 +490,7 @@ ("lux def" Source ("lux type check type" {#Named [..prelude_module "Source"] - {#Product Location {#Product Nat Text}}}) + {#Product Location {#Product Nat Text}}}) .public) ... (type: .public Module_State @@ -499,14 +499,14 @@ ... #Cached) ("lux def type tagged" Module_State {#Named [..prelude_module "Module_State"] - {#Sum - ... #Active - Any - {#Sum - ... #Compiled - Any - ... #Cached - Any}}} + {#Sum + ... #Active + Any + {#Sum + ... #Compiled + Any + ... #Cached + Any}}} {"Active" "Compiled" "Cached"} .public) @@ -519,21 +519,21 @@ ... #module_state Module_State])) ("lux def type tagged" Module {#Named [..prelude_module "Module"] - {#Product - ... module_hash - Nat - {#Product - ... module_aliases - {#Apply {#Product Text Text} List} - {#Product - ... definitions - {#Apply {#Product Text Global} List} - {#Product - ... imports - {#Apply Text List} - ... module_state - Module_State - }}}}} + {#Product + ... module_hash + Nat + {#Product + ... module_aliases + {#Apply {#Product Text Text} List} + {#Product + ... definitions + {#Apply {#Product Text Global} List} + {#Product + ... imports + {#Apply Text List} + ... module_state + Module_State + }}}}} ["module_hash" "module_aliases" "definitions" "imports" "module_state"] .public) @@ -544,13 +544,13 @@ ... #var_bindings (List [Nat (Maybe Type)])])) ("lux def type tagged" Type_Context {#Named [..prelude_module "Type_Context"] - {#Product ... ex_counter - Nat - {#Product ... var_counter - Nat - ... var_bindings - {#Apply {#Product Nat {#Apply Type Maybe}} - List}}}} + {#Product ... ex_counter + Nat + {#Product ... var_counter + Nat + ... var_bindings + {#Apply {#Product Nat {#Apply Type Maybe}} + List}}}} ["ex_counter" "var_counter" "var_bindings"] .public) @@ -560,12 +560,12 @@ ... #Interpreter) ("lux def type tagged" Mode {#Named [..prelude_module "Mode"] - {#Sum ... Build - Any - {#Sum ... Eval - Any - ... Interpreter - Any}}} + {#Sum ... Build + Any + {#Sum ... Eval + Any + ... Interpreter + Any}}} {"Build" "Eval" "Interpreter"} .public) @@ -576,14 +576,14 @@ ... #mode Mode])) ("lux def type tagged" Info {#Named [..prelude_module "Info"] - {#Product - ... target - Text - {#Product - ... version - Text - ... mode - Mode}}} + {#Product + ... target + Text + {#Product + ... version + Text + ... mode + Mode}}} ["target" "version" "mode"] .public) @@ -604,51 +604,51 @@ ... #host Any])) ("lux def type tagged" Lux {#Named [..prelude_module "Lux"] - ({Lux - {#Apply {0 #0 ["" #End]} - {#UnivQ #End - {#Product - ... info - Info - {#Product - ... source - Source - {#Product - ... location - Location - {#Product - ... current_module - {#Apply Text Maybe} - {#Product - ... modules - {#Apply {#Product Text Module} List} - {#Product - ... scopes - {#Apply Scope List} - {#Product - ... type_context - Type_Context - {#Product - ... expected - {#Apply Type Maybe} - {#Product - ... seed - Nat - {#Product - ... scope_type_vars - {#Apply Nat List} - {#Product - ... extensions - Any - {#Product - ... eval - {#Function Type - {#Function Code - {#Function Lux - {#Sum Text {#Product Lux Any}}}}} - ... host - Any}}}}}}}}}}}}}}} - {#Apply {0 #0 ["" #End]} {#Parameter 0}})} + ({Lux + {#Apply {0 #0 ["" #End]} + {#UnivQ #End + {#Product + ... info + Info + {#Product + ... source + Source + {#Product + ... location + Location + {#Product + ... current_module + {#Apply Text Maybe} + {#Product + ... modules + {#Apply {#Product Text Module} List} + {#Product + ... scopes + {#Apply Scope List} + {#Product + ... type_context + Type_Context + {#Product + ... expected + {#Apply Type Maybe} + {#Product + ... seed + Nat + {#Product + ... scope_type_vars + {#Apply Nat List} + {#Product + ... extensions + Any + {#Product + ... eval + {#Function Type + {#Function Code + {#Function Lux + {#Sum Text {#Product Lux Any}}}}} + ... host + Any}}}}}}}}}}}}}}} + {#Apply {0 #0 ["" #End]} {#Parameter 0}})} ["info" "source" "location" "current_module" "modules" "scopes" "type_context" "expected" "seed" "scope_type_vars" "extensions" "eval" "host"] .public) @@ -657,10 +657,10 @@ ("lux def" Meta ("lux type check type" {#Named [..prelude_module "Meta"] - {#UnivQ #End - {#Function Lux - {#Apply {#Product Lux {#Parameter 1}} - {#Apply Text Either}}}}}) + {#UnivQ #End + {#Function Lux + {#Apply {#Product Lux {#Parameter 1}} + {#Apply Text Either}}}}}) .public) ... (type: .public Macro' @@ -668,7 +668,7 @@ ("lux def" Macro' ("lux type check type" {#Named [..prelude_module "Macro'"] - {#Function Code_List {#Apply Code_List Meta}}}) + {#Function Code_List {#Apply Code_List Meta}}}) .public) ... (type: .public Macro @@ -676,18 +676,18 @@ ("lux def" Macro ("lux type check type" {#Named [..prelude_module "Macro"] - {#Primitive "#Macro" #End}}) + {#Primitive "#Macro" #End}}) .public) ... Base functions & macros ("lux def" in_meta ("lux type check" {#UnivQ #End - {#Function {#Parameter 1} - {#Function Lux - {#Apply {#Product Lux - {#Parameter 1}} - {#Apply Text Either}}}}} + {#Function {#Parameter 1} + {#Function Lux + {#Apply {#Product Lux + {#Parameter 1}} + {#Apply Text Either}}}}} ([_ val] ([_ state] {#Right state val}))) @@ -696,11 +696,11 @@ ("lux def" failure ("lux type check" {#UnivQ #End - {#Function Text - {#Function Lux - {#Apply {#Product Lux - {#Parameter 1}} - {#Apply Text Either}}}}} + {#Function Text + {#Function Lux + {#Apply {#Product Lux + {#Parameter 1}} + {#Apply Text Either}}}}} ([_ msg] ([_ state] {#Left msg}))) @@ -711,8 +711,8 @@ ([_ tokens] ({{#Item lhs {#Item rhs {#Item body #End}}} (in_meta {#Item (form$ {#Item (variant$ {#Item lhs {#Item body #End}}) - {#Item rhs #End}}) - #End}) + {#Item rhs #End}}) + #End}) _ (failure "Wrong syntax for let''")} @@ -724,31 +724,31 @@ ([_ tokens] ({{#Item [_ {#Tuple {#Item arg args'}}] {#Item body #End}} (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Identifier ["" ""]}) - {#Item arg #End}}}) - {#Item ({#End - body - - _ - (_ann {#Form {#Item (_ann {#Identifier [..prelude_module "function''"]}) - {#Item (_ann {#Tuple args'}) - {#Item body #End}}}})} - args') - #End}}}) - #End}) + {#Item arg #End}}}) + {#Item ({#End + body + + _ + (_ann {#Form {#Item (_ann {#Identifier [..prelude_module "function''"]}) + {#Item (_ann {#Tuple args'}) + {#Item body #End}}}})} + args') + #End}}}) + #End}) {#Item [_ {#Identifier ["" self]}] {#Item [_ {#Tuple {#Item arg args'}}] {#Item body #End}}} (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Identifier ["" self]}) - {#Item arg #End}}}) - {#Item ({#End - body - - _ - (_ann {#Form {#Item (_ann {#Identifier [..prelude_module "function''"]}) - {#Item (_ann {#Tuple args'}) - {#Item body #End}}}})} - args') - #End}}}) - #End}) + {#Item arg #End}}}) + {#Item ({#End + body + + _ + (_ann {#Form {#Item (_ann {#Identifier [..prelude_module "function''"]}) + {#Item (_ann {#Tuple args'}) + {#Item body #End}}}})} + args') + #End}}}) + #End}) _ (failure "Wrong syntax for function''")} @@ -765,8 +765,8 @@ ([_ tag] ([_ value] (tuple$ {#Item location_code - {#Item (form$ {#Item (tag$ tag) {#Item value #End}}) - #End}})))) + {#Item (form$ {#Item (tag$ tag) {#Item value #End}}) + #End}})))) #0) ("lux def" flag_meta @@ -793,17 +793,17 @@ ("lux type check" {#Function Code {#Function {#Apply Code List} {#Function Code Code}}} (function'' [self inputs output] (form$ {#Item (identifier$ [..prelude_module "function''"]) - {#Item self - {#Item (tuple$ inputs) - {#Item output #End}}}}))) + {#Item self + {#Item (tuple$ inputs) + {#Item output #End}}}}))) #0) ("lux def" as_macro ("lux type check" {#Function Code Code} (function'' [expression] (form$ {#Item (text$ "lux macro") - {#Item expression - #End}}))) + {#Item expression + #End}}))) #0) ("lux def" def:'' @@ -833,7 +833,7 @@ ({{#Item export_policy {#Item [_ {#Form {#Item name args}}] {#Item body #End}}} (in_meta {#Item (as_def name (as_macro (as_function name args body)) export_policy) - #End}) + #End}) _ (failure "Wrong syntax for macro:'")} @@ -849,10 +849,10 @@ {#Item x {#Item y xs}} (in_meta {#Item (form$ {#Item (identifier$ [..prelude_module "$'"]) - {#Item (variant$ {#Item (tag$ [..prelude_module "Apply"]) - {#Item y {#Item x #End}}}) - xs}}) - #End}) + {#Item (variant$ {#Item (tag$ [..prelude_module "Apply"]) + {#Item y {#Item x #End}}}) + xs}}) + #End}) _ (failure "Wrong syntax for $'")} @@ -860,10 +860,10 @@ (def:'' .private (list\each f xs) {#UnivQ #End - {#UnivQ #End - {#Function {#Function {#Parameter 3} {#Parameter 1}} - {#Function ($' List {#Parameter 3}) - ($' List {#Parameter 1})}}}} + {#UnivQ #End + {#Function {#Function {#Parameter 3} {#Parameter 1}} + {#Function ($' List {#Parameter 3}) + ($' List {#Parameter 1})}}}} ({#End #End @@ -935,11 +935,11 @@ (def:'' .private (list\mix f init xs) ... (All (_ a b) (-> (-> b a a) a (List b) a)) {#UnivQ #End {#UnivQ #End {#Function {#Function {#Parameter 1} - {#Function {#Parameter 3} - {#Parameter 3}}} - {#Function {#Parameter 3} - {#Function ($' List {#Parameter 1}) - {#Parameter 3}}}}}} + {#Function {#Parameter 3} + {#Parameter 3}}} + {#Function {#Parameter 3} + {#Function ($' List {#Parameter 1}) + {#Parameter 3}}}}}} ({#End init @@ -949,13 +949,13 @@ (def:'' .private (list\size list) {#UnivQ #End - {#Function ($' List {#Parameter 1}) Nat}} + {#Function ($' List {#Parameter 1}) Nat}} (list\mix (function'' [_ acc] ("lux i64 +" 1 acc)) 0 list)) (def:'' .private (let$ binding value body) {#Function Code {#Function Code {#Function Code Code}}} (form$ {#Item (variant$ {#Item binding {#Item body #End}}) - {#Item value #End}})) + {#Item value #End}})) (def:'' .private (UnivQ$ body) {#Function Code Code} @@ -978,11 +978,11 @@ (def:'' .private (quantified_type_parameter idx) {#Function Nat Code} (variant$ {#Item (tag$ [..prelude_module "Parameter"]) - {#Item (form$ {#Item (text$ "lux i64 +") - {#Item (local_identifier$ ..quantification_level) - {#Item (nat$ idx) - #End}}}) - #End}})) + {#Item (form$ {#Item (text$ "lux i64 +") + {#Item (local_identifier$ ..quantification_level) + {#Item (nat$ idx) + #End}}}) + #End}})) (def:'' .private (next_level depth) {#Function Nat Nat} @@ -1003,7 +1003,7 @@ {#Parameter id} ({id' ({#0 {#Parameter id'} - #1 {#Parameter ("lux i64 -" 2 id')}} + #1 {#Parameter ("lux i64 -" 2 id')}} (self_id? id))} ("lux i64 -" ("lux i64 -" depth id) 0)) @@ -1014,27 +1014,27 @@ {#Sum left right} {#Sum (__adjusted_quantified_type__ permission depth left) - (__adjusted_quantified_type__ permission depth right)} + (__adjusted_quantified_type__ permission depth right)} {#Product left right} {#Product (__adjusted_quantified_type__ permission depth left) - (__adjusted_quantified_type__ permission depth right)} + (__adjusted_quantified_type__ permission depth right)} {#Function input output} {#Function (__adjusted_quantified_type__ permission depth input) - (__adjusted_quantified_type__ permission depth output)} + (__adjusted_quantified_type__ permission depth output)} {#UnivQ environment body} {#UnivQ environment - (__adjusted_quantified_type__ permission (next_level depth) body)} + (__adjusted_quantified_type__ permission (next_level depth) body)} {#ExQ environment body} {#ExQ environment - (__adjusted_quantified_type__ permission (next_level depth) body)} + (__adjusted_quantified_type__ permission (next_level depth) body)} {#Apply parameter function} {#Apply (__adjusted_quantified_type__ permission depth parameter) - (__adjusted_quantified_type__ permission depth function)} + (__adjusted_quantified_type__ permission depth function)} ... Leave these alone. {#Named name anonymous} type @@ -1049,22 +1049,22 @@ (def:'' .private (with_correct_quantification body) {#Function Code Code} (form$ {#Item (identifier$ [prelude_module "__adjusted_quantified_type__"]) - {#Item (local_identifier$ ..quantification_level) - {#Item (nat$ 0) - {#Item body - #End}}}})) + {#Item (local_identifier$ ..quantification_level) + {#Item (nat$ 0) + {#Item body + #End}}}})) (def:'' .private (with_quantification depth body) {#Function Nat {#Function Code Code}} ({g!level (let$ g!level (form$ {#Item (text$ "lux i64 +") - {#Item g!level - {#Item (nat$ ("lux type as" Nat - ("lux i64 *" +2 - ("lux type as" Int - depth)))) - #End}}}) + {#Item g!level + {#Item (nat$ ("lux type as" Nat + ("lux i64 *" +2 + ("lux type as" Int + depth)))) + #End}}}) body)} (local_identifier$ ..quantification_level))) @@ -1076,18 +1076,18 @@ #scope_type_vars _ #eval _] (list\mix (function'' [scope verdict] ({#1 #1 - _ ({[#name _ #inner _ #captured _ - #locals [#counter _ - #mappings locals]] - (list\mix (function'' [local verdict] - ({[local _] - ({#1 #1 - _ ("lux text =" ..quantification_level local)} - verdict)} - local)) - #0 - locals)} - scope)} + _ ({[#name _ #inner _ #captured _ + #locals [#counter _ + #mappings locals]] + (list\mix (function'' [local verdict] + ({[local _] + ({#1 #1 + _ ("lux text =" ..quantification_level local)} + verdict)} + local)) + #0 + locals)} + scope)} verdict)) #0 scopes)} @@ -1095,11 +1095,11 @@ (macro:' .public (All tokens lux) ({{#Item [_ {#Form {#Item self_name args}}] - {#Item body #End}} + {#Item body #End}} {#Right [lux {#Item ({raw ({#1 raw - #0 (..quantified raw)} + #0 (..quantified raw)} (initialized_quantification? lux))} ({#End body @@ -1119,7 +1119,7 @@ body)] args))))} args)) - #End}]} + #End}]} _ {#Left "Wrong syntax for All"}} @@ -1127,11 +1127,11 @@ (macro:' .public (Ex tokens lux) ({{#Item [_ {#Form {#Item self_name args}}] - {#Item body #End}} + {#Item body #End}} {#Right [lux {#Item ({raw ({#1 raw - #0 (..quantified raw)} + #0 (..quantified raw)} (initialized_quantification? lux))} ({#End body @@ -1151,7 +1151,7 @@ body)] args))))} args)) - #End}]} + #End}]} _ {#Left "Wrong syntax for Ex"}} @@ -1172,7 +1172,7 @@ (function'' [i o] (variant$ {#Item (tag$ [..prelude_module "Function"]) {#Item i {#Item o #End}}}))) output inputs) - #End}) + #End}) _ (failure "Wrong syntax for ->")} @@ -1181,11 +1181,11 @@ (macro:' .public (list xs) (in_meta {#Item (list\mix (function'' [head tail] (variant$ {#Item (tag$ [..prelude_module "Item"]) - {#Item (tuple$ {#Item [head {#Item [tail #End]}]}) - #End}})) + {#Item (tuple$ {#Item [head {#Item [tail #End]}]}) + #End}})) (tag$ [..prelude_module "End"]) (list\reversed xs)) - #End})) + #End})) (macro:' .public (list& xs) ({{#Item last init} @@ -1311,7 +1311,7 @@ {#Item x xs'} ({#1 #1 - #0 (any? p xs')} + #0 (any? p xs')} (p x))} xs)) @@ -1389,13 +1389,13 @@ ... then))) ("lux def type tagged" Monad {#Named [..prelude_module "Monad"] - (All (_ !) - (Tuple (All (_ a) - (-> a ($' ! a))) - (All (_ a b) - (-> (-> a ($' ! b)) - ($' ! a) - ($' ! b)))))} + (All (_ !) + (Tuple (All (_ a) + (-> a ($' ! a))) + (All (_ a b) + (-> (-> a ($' ! b)) + ($' ! a) + ($' ! b)))))} ["in" "then"] #0) @@ -1407,7 +1407,7 @@ #then (function' [f ma] ({#None #None - {#Some a} (f a)} + {#Some a} (f a)} ma))]) (def:''' .private meta_monad @@ -1967,10 +1967,10 @@ (def:''' .private (digit::format digit) (-> Nat Text) ({0 "0" - 1 "1" 2 "2" 3 "3" - 4 "4" 5 "5" 6 "6" - 7 "7" 8 "8" 9 "9" - _ ("lux io error" "@digit::format Undefined behavior.")} + 1 "1" 2 "2" 3 "3" + 4 "4" 5 "5" 6 "6" + 7 "7" 8 "8" 9 "9" + _ ("lux io error" "@digit::format Undefined behavior.")} digit)) (def:''' .private (nat\encoded value) @@ -2252,31 +2252,31 @@ (` (Tuple (~+ (list\each normal_type members)))) [_ {#Form {#Item [_ {#Text "lux in-module"}] - {#Item [_ {#Text module}] - {#Item type' - #End}}}}] + {#Item [_ {#Text module}] + {#Item type' + #End}}}}] (` ("lux in-module" (~ (text$ module)) (~ (normal_type type')))) [_ {#Form {#Item [_ {#Identifier ["" ":~"]}] {#Item expression #End}}}] expression [_0 {#Form {#Item [_1 {#Variant {#Item binding {#Item body #End}}}] - {#Item value - #End}}}] + {#Item value + #End}}}] [_0 {#Form {#Item [_1 {#Variant {#Item binding {#Item (normal_type body) #End}}}] - {#Item value - #End}}}] + {#Item value + #End}}}] [_0 {#Form {#Item [_1 {#Identifier ["library/lux" "__adjusted_quantified_type__"]}] - {#Item _permission - {#Item _level - {#Item body - #End}}}}}] + {#Item _permission + {#Item _level + {#Item body + #End}}}}}] [_0 {#Form {#Item [_1 {#Identifier [..prelude_module "__adjusted_quantified_type__"]}] - {#Item _permission - {#Item _level - {#Item (normal_type body) - #End}}}}}] + {#Item _permission + {#Item _level + {#Item (normal_type body) + #End}}}}}] [_ {#Form {#Item type_fn args}}] (list\mix ("lux type check" (-> Code Code Code) @@ -2331,7 +2331,7 @@ (All (_ a) (-> ($' List a) Bit)) ({#End #1 - _ #0} + _ #0} xs)) (template [ ] @@ -2356,7 +2356,7 @@ #seed ("lux i64 +" 1 seed) #expected expected #location location #extensions extensions #scope_type_vars scope_type_vars #eval _eval] - (local_identifier$ ($_ text\composite "__gensym__" prefix (nat\encoded seed)))}} + (local_identifier$ ($_ text\composite "__gensym__" prefix (nat\encoded seed)))}} state)) (macro:' .public (exec tokens) @@ -2413,8 +2413,8 @@ (def:' .private (expander branches) (-> (List Code) (Meta (List Code))) ({{#Item [_ {#Form {#Item [_ {#Identifier name}] args}}] - {#Item body - branches'}} + {#Item body + branches'}} (do meta_monad [??? (macro? name)] (if ??? @@ -3257,7 +3257,7 @@ {#Some type''} (let [typeC (` {#.Named [(~ (text$ module_name)) (~ (text$ name))] - (.type (~ type''))})] + (.type (~ type''))})] (in_meta (list (case labels?? {#Some labels} (` ("lux def type tagged" (~ type_name) @@ -4947,7 +4947,7 @@ (-> (List Code) (Meta Code))) (case (list\reversed elems) {#Item [_ {#Form {#Item [[_ {#Identifier ["" "~+"]}] {#Item [spliced #End]}]}}] - inits} + inits} (do meta_monad [=inits (monad\each meta_monad untemplated_pattern (list\reversed inits))] (in (` [(~ g!meta) { (~ (untemplated_list& spliced =inits))}]))) -- cgit v1.2.3