aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux.lux298
-rw-r--r--stdlib/source/library/lux/abstract/monad/indexed.lux8
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux4
-rw-r--r--stdlib/source/library/lux/control/concurrency/actor.lux28
-rw-r--r--stdlib/source/library/lux/control/concurrency/atom.lux12
-rw-r--r--stdlib/source/library/lux/control/concurrency/semaphore.lux16
-rw-r--r--stdlib/source/library/lux/control/concurrency/stm.lux12
-rw-r--r--stdlib/source/library/lux/control/concurrency/thread.lux8
-rw-r--r--stdlib/source/library/lux/control/exception.lux8
-rw-r--r--stdlib/source/library/lux/control/function/mutual.lux8
-rw-r--r--stdlib/source/library/lux/control/parser/text.lux16
-rw-r--r--stdlib/source/library/lux/control/security/policy.lux8
-rw-r--r--stdlib/source/library/lux/control/writer.lux4
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary.lux8
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/ordered.lux16
-rw-r--r--stdlib/source/library/lux/data/collection/queue.lux16
-rw-r--r--stdlib/source/library/lux/data/collection/row.lux12
-rw-r--r--stdlib/source/library/lux/data/collection/tree.lux20
-rw-r--r--stdlib/source/library/lux/data/collection/tree/finger.lux12
-rw-r--r--stdlib/source/library/lux/data/collection/tree/zipper.lux54
-rw-r--r--stdlib/source/library/lux/data/color.lux64
-rw-r--r--stdlib/source/library/lux/data/color/named.lux4
-rw-r--r--stdlib/source/library/lux/data/format/css.lux4
-rw-r--r--stdlib/source/library/lux/data/format/css/font.lux8
-rw-r--r--stdlib/source/library/lux/data/format/css/selector.lux4
-rw-r--r--stdlib/source/library/lux/data/format/css/value.lux4
-rw-r--r--stdlib/source/library/lux/data/format/html.lux16
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux36
-rw-r--r--stdlib/source/library/lux/data/store.lux8
-rw-r--r--stdlib/source/library/lux/data/trace.lux10
-rw-r--r--stdlib/source/library/lux/documentation.lux22
-rw-r--r--stdlib/source/library/lux/extension.lux4
-rw-r--r--stdlib/source/library/lux/ffi.js.lux4
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux77
-rw-r--r--stdlib/source/library/lux/ffi.lua.lux4
-rw-r--r--stdlib/source/library/lux/ffi.old.lux94
-rw-r--r--stdlib/source/library/lux/ffi.php.lux4
-rw-r--r--stdlib/source/library/lux/ffi.py.lux4
-rw-r--r--stdlib/source/library/lux/ffi.rb.lux4
-rw-r--r--stdlib/source/library/lux/ffi.scm.lux4
-rw-r--r--stdlib/source/library/lux/locale/language.lux8
-rw-r--r--stdlib/source/library/lux/locale/territory.lux8
-rw-r--r--stdlib/source/library/lux/macro/syntax/check.lux4
-rw-r--r--stdlib/source/library/lux/macro/syntax/declaration.lux4
-rw-r--r--stdlib/source/library/lux/macro/syntax/definition.lux8
-rw-r--r--stdlib/source/library/lux/macro/syntax/input.lux4
-rw-r--r--stdlib/source/library/lux/macro/template.lux8
-rw-r--r--stdlib/source/library/lux/math/modular.lux12
-rw-r--r--stdlib/source/library/lux/math/number/complex.lux84
-rw-r--r--stdlib/source/library/lux/math/number/frac.lux2
-rw-r--r--stdlib/source/library/lux/math/number/ratio.lux20
-rw-r--r--stdlib/source/library/lux/meta.lux51
-rw-r--r--stdlib/source/library/lux/meta/location.lux4
-rw-r--r--stdlib/source/library/lux/target/common_lisp.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute.lux12
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute/code.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute/code/exception.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux20
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/class.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/constant.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/constant/pool.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/field.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/method.lux12
-rw-r--r--stdlib/source/library/lux/target/jvm/type.lux4
-rw-r--r--stdlib/source/library/lux/target/php.lux8
-rw-r--r--stdlib/source/library/lux/target/python.lux4
-rw-r--r--stdlib/source/library/lux/target/ruby.lux4
-rw-r--r--stdlib/source/library/lux/target/scheme.lux4
-rw-r--r--stdlib/source/library/lux/test.lux12
-rw-r--r--stdlib/source/library/lux/time.lux8
-rw-r--r--stdlib/source/library/lux/time/date.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/init.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/platform.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux28
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/directive.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/generation.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux27
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux126
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux207
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux9
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/document.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/context.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux8
-rw-r--r--stdlib/source/library/lux/tool/interpreter.lux8
-rw-r--r--stdlib/source/library/lux/type.lux4
-rw-r--r--stdlib/source/library/lux/type/abstract.lux4
-rw-r--r--stdlib/source/library/lux/type/check.lux4
-rw-r--r--stdlib/source/library/lux/type/implicit.lux8
-rw-r--r--stdlib/source/library/lux/type/quotient.lux8
-rw-r--r--stdlib/source/library/lux/type/refinement.lux12
-rw-r--r--stdlib/source/library/lux/world/db/jdbc.lux8
-rw-r--r--stdlib/source/library/lux/world/file.lux8
-rw-r--r--stdlib/source/library/lux/world/file/watch.lux16
-rw-r--r--stdlib/source/library/lux/world/input/keyboard.lux8
-rw-r--r--stdlib/source/library/lux/world/net.lux4
-rw-r--r--stdlib/source/library/lux/world/net/http.lux20
-rw-r--r--stdlib/source/library/lux/world/net/http/client.lux4
-rw-r--r--stdlib/source/library/lux/world/net/http/mime.lux4
-rw-r--r--stdlib/source/library/lux/world/net/http/response.lux8
-rw-r--r--stdlib/source/library/lux/world/output/video/resolution.lux8
-rw-r--r--stdlib/source/library/lux/world/service/authentication.lux9
-rw-r--r--stdlib/source/library/lux/world/service/crud.lux14
-rw-r--r--stdlib/source/library/lux/world/service/inventory.lux14
-rw-r--r--stdlib/source/library/lux/world/service/journal.lux18
-rw-r--r--stdlib/source/library/lux/world/service/mail.lux5
124 files changed, 1110 insertions, 1039 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index d717434be..e9b07fe8f 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -196,9 +196,10 @@
#1)
... (type: .public Location
-... {#module Text
-... #line Nat
-... #column Nat})
+... (Record
+... [#module Text
+... #line Nat
+... #column Nat]))
("lux def type tagged" Location
(#Named ["library/lux" "Location"]
(#Product Text (#Product Nat Nat)))
@@ -208,8 +209,9 @@
#1)
... (type: .public (Ann m v)
-... {#meta m
-... #datum v})
+... (Record
+... [#meta m
+... #datum v]))
("lux def type tagged" Ann
(#Named ["library/lux" "Ann"]
(#UnivQ #End
@@ -442,8 +444,9 @@
.public)
... (type: .public (Bindings k v)
-... {#counter Nat
-... #mappings (List [k v])})
+... (Record
+... [#counter Nat
+... #mappings (List [k v])]))
("lux def type tagged" Bindings
(#Named ["library/lux" "Bindings"]
(#UnivQ #End
@@ -472,10 +475,11 @@
.public)
... (type: .public Scope
-... {#name (List Text)
-... #inner Nat
-... #locals (Bindings Text [Type Nat])
-... #captured (Bindings Text [Type Ref])})
+... (Record
+... [#name (List Text)
+... #inner Nat
+... #locals (Bindings Text [Type Nat])
+... #captured (Bindings Text [Type Ref])]))
("lux def type tagged" Scope
(#Named ["library/lux" "Scope"]
(#Product ... name
@@ -540,12 +544,12 @@
... (type: .public Module
... (Record
-... {#module_hash Nat
+... [#module_hash Nat
... #module_aliases (List [Text Text])
... #definitions (List [Text Global])
... #imports (List Text)
... #module_annotations (Maybe Code)
-... #module_state Module_State}))
+... #module_state Module_State]))
("lux def type tagged" Module
(#Named ["library/lux" "Module"]
(#Product
@@ -571,9 +575,10 @@
.public)
... (type: .public Type_Context
-... {#ex_counter Nat
-... #var_counter Nat
-... #var_bindings (List [Nat (Maybe Type)])})
+... (Record
+... [#ex_counter Nat
+... #var_counter Nat
+... #var_bindings (List [Nat (Maybe Type)])]))
("lux def type tagged" Type_Context
(#Named ["library/lux" "Type_Context"]
(#Product ... ex_counter
@@ -604,9 +609,10 @@
.public)
... (type: .public Info
-... {#target Text
-... #version Text
-... #mode Mode})
+... (Record
+... [#target Text
+... #version Text
+... #mode Mode]))
("lux def type tagged" Info
(#Named ["library/lux" "Info"]
(#Product
@@ -622,19 +628,20 @@
.public)
... (type: .public Lux
-... {#info Info
-... #source Source
-... #location Location
-... #current_module (Maybe Text)
-... #modules (List [Text Module])
-... #scopes (List Scope)
-... #type_context Type_Context
-... #expected (Maybe Type)
-... #seed Nat
-... #scope_type_vars (List Nat)
-... #extensions Any
-... #eval (-> Type Code (-> Lux (Either Text [Lux Any])))
-... #host Any})
+... (Record
+... [#info Info
+... #source Source
+... #location Location
+... #current_module (Maybe Text)
+... #modules (List [Text Module])
+... #scopes (List Scope)
+... #type_context Type_Context
+... #expected (Maybe Type)
+... #seed Nat
+... #scope_type_vars (List Nat)
+... #extensions Any
+... #eval (-> Type Code (-> Lux (Either Text [Lux Any])))
+... #host Any]))
("lux def type tagged" Lux
(#Named ["library/lux" "Lux"]
({Lux
@@ -1162,15 +1169,15 @@
(def:'' .private (initialized_quantification? lux)
#End
(#Function Lux Bit)
- ({{#info _ #source _ #current_module _ #modules _
+ ({[#info _ #source _ #current_module _ #modules _
#scopes scopes #type_context _ #host _
#seed _ #expected _ #location _ #extensions _
- #scope_type_vars _ #eval _}
+ #scope_type_vars _ #eval _]
(list\mix (function'' [scope verdict]
({#1 #1
- _ ({{#name _ #inner _ #captured _
- #locals {#counter _
- #mappings locals}}
+ _ ({[#name _ #inner _ #captured _
+ #locals [#counter _
+ #mappings locals]]
(list\mix (function'' [local verdict]
({[local _]
({#1 #1
@@ -1518,19 +1525,19 @@
(def:''' .private maybe_monad
#End
($' Monad Maybe)
- {#in
+ [#in
(function' [x] (#Some x))
#then
(function' [f ma]
({#None #None
(#Some a) (f a)}
- ma))})
+ ma))])
(def:''' .private meta_monad
#End
($' Monad Meta)
- {#in
+ [#in
(function' [x]
(function' [state]
(#Right state x)))
@@ -1543,7 +1550,7 @@
(#Right [state' a])
(f a state')}
- (ma state))))})
+ (ma state))))])
(macro:' .private (do tokens)
({(#Item monad (#Item [_ (#Tuple bindings)] (#Item body #End)))
@@ -1570,7 +1577,8 @@
var))))
body
(list\reversed (pairs bindings)))]
- (in_meta (list (form$ (list (record$ (list [(record$ (list [(tag$ ["library/lux" "in"]) g!in] [(tag$ ["library/lux" "then"]) g!then]))
+ (in_meta (list (form$ (list (record$ (list [(tuple$ (list (tag$ ["library/lux" "in"]) g!in
+ (tag$ ["library/lux" "then"]) g!then))
body']))
monad)))))
@@ -1585,7 +1593,7 @@
(-> a ($' m b))
($' List a)
($' m ($' List b))))
- (let' [{#in in #then _} m]
+ (let' [[#in in #then _] m]
({#End
(in #End)
@@ -1604,7 +1612,7 @@
b
($' List a)
($' m b)))
- (let' [{#in in #then _} m]
+ (let' [[#in in #then _] m]
({#End
(in y)
@@ -1660,11 +1668,11 @@
#End
(-> Name ($' Meta Name))
(let' [[module name] full_name
- {#info info #source source #current_module _ #modules modules
+ [#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval} state]
- ({(#Some {#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _})
+ #scope_type_vars scope_type_vars #eval _eval] state]
+ ({(#Some [#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _])
({(#Some constant)
({(#Alias real_name)
(#Right [state real_name])
@@ -1849,10 +1857,10 @@
(def:'' .private (current_module_name state)
#End
($' Meta Text)
- ({{#info info #source source #current_module current_module #modules modules
+ ({[#info info #source source #current_module current_module #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval}
+ #scope_type_vars scope_type_vars #eval _eval]
({(#Some module_name)
(#Right [state module_name])
@@ -2201,7 +2209,7 @@
($' Maybe Macro))
(do maybe_monad
[$module (plist\value module modules)
- gdef (let' [{#module_hash _ #module_aliases _ #definitions bindings #imports _ #module_annotations _ #module_state _} ("lux type check" Module $module)]
+ gdef (let' [[#module_hash _ #module_aliases _ #definitions bindings #imports _ #module_annotations _ #module_state _] ("lux type check" Module $module)]
(plist\value name bindings))]
({(#Alias [r_module r_name])
(macro'' modules current_module r_module r_name)
@@ -2244,11 +2252,11 @@
[current_module current_module_name]
(let' [[module name] full_name]
(function' [state]
- ({{#info info #source source #current_module _ #modules modules
+ ({[#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected
#location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval}
+ #scope_type_vars scope_type_vars #eval _eval]
(#Right state (macro'' modules current_module module name))}
state)))))
@@ -2533,16 +2541,16 @@
(def:''' .private (identifier prefix state)
#End
(-> Text ($' Meta Code))
- ({{#info info #source source #current_module _ #modules modules
+ ({[#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected
#location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval}
- (#Right {#info info #source source #current_module _ #modules modules
+ #scope_type_vars scope_type_vars #eval _eval]
+ (#Right [#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed ("lux i64 +" 1 seed) #expected expected
#location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval}
+ #scope_type_vars scope_type_vars #eval _eval]
(local_identifier$ ($_ text\composite "__gensym__" prefix (nat\encoded seed))))}
state))
@@ -3255,10 +3263,10 @@
(def: (module name)
(-> Text (Meta Module))
(function (_ state)
- (let [{#info info #source source #current_module _ #modules modules
+ (let [[#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval} state]
+ #scope_type_vars scope_type_vars #eval _eval] state]
(case (plist\value name modules)
(#Some module)
(#Right state module)
@@ -3270,7 +3278,7 @@
(-> Name (Meta [Nat (List Name) Bit Type]))
(do meta_monad
[=module (..module module)
- .let [{#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _} =module]]
+ .let [[#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _] =module]]
(case (plist\value (text\composite "#" name) definitions)
(#Some (#Slot [exported type group index]))
(in_meta [index
@@ -3298,7 +3306,7 @@
(#Named [module name] unnamed)
(do meta_monad
[=module (..module module)
- .let [{#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _} =module]]
+ .let [[#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _] =module]]
(case (plist\value name definitions)
(#Some (#Type [exported? (#Named _ _type) (#Right slots)]))
(case (interface_methods _type)
@@ -3319,10 +3327,10 @@
(def: expected_type
(Meta Type)
(function (_ state)
- (let [{#info info #source source #current_module _ #modules modules
+ (let [[#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval} state]
+ #scope_type_vars scope_type_vars #eval _eval] state]
(case expected
(#Some type)
(#Right state type)
@@ -3394,13 +3402,13 @@
(list\each (function (_ tag) [(product\right tag) (tag$ tag)])
tags))]
members (monad\each meta_monad
- (: (-> Code (Meta [Code Code]))
+ (: (-> Code (Meta (List Code)))
(function (_ token)
(case token
(^ [_ (#Form (list [_ (#Text "lux def")] [_ (#Identifier "" tag_name)] value meta export_policy))])
(case (plist\value tag_name tag_mappings)
(#Some tag)
- (in [tag value])
+ (in (list tag value))
_
(failure (text\composite "Unknown implementation member: " tag_name)))
@@ -3408,7 +3416,7 @@
_
(failure "Invalid implementation member."))))
(list\conjoint tokens'))]
- (in (list (record$ members)))))
+ (in (list (tuple$ (list\conjoint members))))))
(def: (text\interposed separator parts)
(-> Text (List Text) Text)
@@ -3539,20 +3547,10 @@
_
#None))
-(def: un_paired
- (-> (List [Code Code]) (List Code))
- (let [pair_list (: (-> [Code Code] (List Code))
- (function (_ [left right])
- (list left right)))]
- (function (_ it)
- (|> it
- (list\each pair_list)
- list\conjoint))))
-
(macro: .public (Record tokens)
(case tokens
- (^ (list [_ (#Record record)]))
- (case (everyP slotP (un_paired record))
+ (^ (list [_ (#Tuple record)]))
+ (case (everyP slotP record)
(#Some slots)
(in_meta (list (` (..Tuple (~+ (list\each product\right slots))))
(tuple$ (list\each (function (_ slot)
@@ -3728,14 +3726,14 @@
(type: Refer
(Record
- {#refer_defs Referrals
- #refer_open (List Openings)}))
+ [#refer_defs Referrals
+ #refer_open (List Openings)]))
(type: Importation
(Record
- {#import_name Text
+ [#import_name Text
#import_alias (Maybe Text)
- #import_refer Refer}))
+ #import_refer Refer]))
(def: (referral_references defs)
(-> (List Code) (Meta (List Text)))
@@ -3921,10 +3919,10 @@
[_ (#Identifier ["" module_name])]
(do meta_monad
[absolute_module_name (..absolute_module_name nested? relative_root module_name)]
- (in (list {#import_name absolute_module_name
+ (in (list [#import_name absolute_module_name
#import_alias #None
- #import_refer {#refer_defs #All
- #refer_open (list)}})))
+ #import_refer [#refer_defs #All
+ #refer_open (list)]])))
... Nested
(^ [_ (#Tuple (list& [_ (#Identifier ["" module_name])] extra))])
@@ -3945,10 +3943,10 @@
sub_imports
_
- (list& {#import_name absolute_module_name
+ (list& [#import_name absolute_module_name
#import_alias #None
- #import_refer {#refer_defs referral
- #refer_open openings}}
+ #import_refer [#refer_defs referral
+ #refer_open openings]]
sub_imports))))
(^ [_ (#Tuple (list& [_ (#Text alias)] [_ (#Identifier ["" module_name])] extra))])
@@ -3970,10 +3968,10 @@
sub_imports
_
- (list& {#import_name absolute_module_name
+ (list& [#import_name absolute_module_name
#import_alias (#Some module_alias)
- #import_refer {#refer_defs referral
- #refer_open openings}}
+ #import_refer [#refer_defs referral
+ #refer_open openings]]
sub_imports))))
... Unrecognized syntax.
@@ -3989,10 +3987,10 @@
(def: (exported_definitions module state)
(-> Text (Meta (List Text)))
(let [[current_module modules] (case state
- {#info info #source source #current_module current_module #modules modules
+ [#info info #source source #current_module current_module #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval}
+ #scope_type_vars scope_type_vars #eval _eval]
[current_module modules])]
(case (plist\value module modules)
(#Some =module)
@@ -4018,7 +4016,7 @@
(#Slot _)
(list))))
- (let [{#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _} =module]
+ (let [[#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_annotations _ #module_state _] =module]
definitions))]
(#Right state (list\conjoint to_alias)))
@@ -4069,17 +4067,17 @@
(def: (in_env name state)
(-> Text Lux (Maybe Type))
(case state
- {#info info #source source #current_module _ #modules modules
+ [#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval}
+ #scope_type_vars scope_type_vars #eval _eval]
(list\one (: (-> Scope (Maybe Type))
(function (_ env)
(case env
- {#name _
+ [#name _
#inner _
- #locals {#counter _ #mappings locals}
- #captured {#counter _ #mappings closure}}
+ #locals [#counter _ #mappings locals]
+ #captured [#counter _ #mappings closure]]
(on_either (list\one (: (-> [Text [Type Any]] (Maybe Type))
(function (_ [bname [type _]])
(if (text\= name bname)
@@ -4092,15 +4090,15 @@
(def: (definition_type name state)
(-> Name Lux (Maybe Type))
(let [[v_module v_name] name
- {#info info #source source #current_module _ #modules modules
+ [#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval} state]
+ #scope_type_vars scope_type_vars #eval _eval] state]
(case (plist\value v_module modules)
#None
#None
- (#Some {#definitions definitions #module_hash _ #module_aliases _ #imports _ #module_annotations _ #module_state _})
+ (#Some [#definitions definitions #module_hash _ #module_aliases _ #imports _ #module_annotations _ #module_state _])
(case (plist\value v_name definitions)
#None
#None
@@ -4125,15 +4123,15 @@
(def: (definition_value name state)
(-> Name (Meta [Type Any]))
(let [[v_module v_name] name
- {#info info #source source #current_module _ #modules modules
+ [#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval} state]
+ #scope_type_vars scope_type_vars #eval _eval] state]
(case (plist\value v_module modules)
#None
(#Left (text\composite "Unknown definition: " (name\encoded name)))
- (#Some {#definitions definitions #module_hash _ #module_aliases _ #imports _ #module_annotations _ #module_state _})
+ (#Some [#definitions definitions #module_hash _ #module_aliases _ #imports _ #module_annotations _ #module_state _])
(case (plist\value v_name definitions)
#None
(#Left (text\composite "Unknown definition: " (name\encoded name)))
@@ -4192,11 +4190,11 @@
(#Left ($_ text\composite "Unknown var: " (name\encoded full_name)))))]
(case temp
(#Right [compiler (#Var type_id)])
- (let [{#info _ #source _ #current_module _ #modules _
+ (let [[#info _ #source _ #current_module _ #modules _
#scopes _ #type_context type_context #host _
#seed _ #expected _ #location _ #extensions extensions
- #scope_type_vars _ #eval _eval} compiler
- {#ex_counter _ #var_counter _ #var_bindings var_bindings} type_context]
+ #scope_type_vars _ #eval _eval] compiler
+ [#ex_counter _ #var_counter _ #var_bindings var_bindings] type_context]
(case (type_variable type_id var_bindings)
#None
temp
@@ -4309,13 +4307,15 @@
g!output (..identifier "")]
(case (interface_methods type)
(#Some members)
- (let [pattern (record$ (list\each (: (-> [Name [Nat Type]] [Code Code])
- (function (_ [[r_module r_name] [r_idx r_type]])
- [(tag$ [r_module r_name])
+ (let [pattern (|> (zipped/2 tags (enumeration members))
+ (list\each (: (-> [Name [Nat Type]] (List Code))
+ (function (_ [[r_module r_name] [r_idx r_type]])
+ (list (tag$ [r_module r_name])
(if ("lux i64 =" idx r_idx)
g!output
- g!_)]))
- (zipped/2 tags (enumeration members))))]
+ g!_)))))
+ list\conjoint
+ tuple$)]
(in_meta (list (` ({(~ pattern) (~ g!output)} (~ record))))))
_
@@ -4415,7 +4415,7 @@
(-> Text Text (Meta Bit))
(do meta_monad
[module (module module_name)
- .let [{#module_hash _ #module_aliases _ #definitions _ #imports imports #module_annotations _ #module_state _} module]]
+ .let [[#module_hash _ #module_aliases _ #definitions _ #imports imports #module_annotations _ #module_state _] module]]
(in (is_member? imports import_name))))
(def: (referrals module_name options)
@@ -4428,8 +4428,8 @@
current_module current_module_name]
(case options
#End
- (in {#refer_defs referral
- #refer_open openings})
+ (in [#refer_defs referral
+ #refer_open openings])
_
(failure ($_ text\composite "Wrong syntax for refer @ " current_module
@@ -4575,18 +4575,22 @@
[g!slot (..identifier "")]
(in_meta [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
- (let [pattern (record$ (list\each (: (-> [Name Nat Code] [Code Code])
- (function (_ [r_slot_name r_idx r_var])
- [(tag$ r_slot_name)
- r_var]))
- pattern'))
- output (record$ (list\each (: (-> [Name Nat Code] [Code Code])
- (function (_ [r_slot_name r_idx r_var])
- [(tag$ r_slot_name)
+ (let [pattern (|> pattern'
+ (list\each (: (-> [Name Nat Code] (List Code))
+ (function (_ [r_slot_name r_idx r_var])
+ (list (tag$ r_slot_name)
+ r_var))))
+ list\conjoint
+ tuple$)
+ output (|> pattern'
+ (list\each (: (-> [Name Nat Code] (List Code))
+ (function (_ [r_slot_name r_idx r_var])
+ (list (tag$ r_slot_name)
(if ("lux i64 =" idx r_idx)
value
- r_var)]))
- pattern'))]
+ r_var)))))
+ list\conjoint
+ tuple$)]
(in_meta (list (` ({(~ pattern) (~ output)} (~ record)))))))
_
@@ -4654,18 +4658,22 @@
[g!slot (..identifier "")]
(in_meta [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
- (let [pattern (record$ (list\each (: (-> [Name Nat Code] [Code Code])
- (function (_ [r_slot_name r_idx r_var])
- [(tag$ r_slot_name)
- r_var]))
- pattern'))
- output (record$ (list\each (: (-> [Name Nat Code] [Code Code])
- (function (_ [r_slot_name r_idx r_var])
- [(tag$ r_slot_name)
+ (let [pattern (|> pattern'
+ (list\each (: (-> [Name Nat Code] (List Code))
+ (function (_ [r_slot_name r_idx r_var])
+ (list (tag$ r_slot_name)
+ r_var))))
+ list\conjoint
+ tuple$)
+ output (|> pattern'
+ (list\each (: (-> [Name Nat Code] (List Code))
+ (function (_ [r_slot_name r_idx r_var])
+ (list (tag$ r_slot_name)
(if ("lux i64 =" idx r_idx)
(` ((~ fun) (~ r_var)))
- r_var)]))
- pattern'))]
+ r_var)))))
+ list\conjoint
+ tuple$)]
(in_meta (list (` ({(~ pattern) (~ output)} (~ record)))))))
_
@@ -4854,13 +4862,15 @@
(function (_ [module name])
[name (local_identifier$ name)]))
(list& hslot tslots))
- pattern (record$ (list\each (: (-> Name [Code Code])
- (function (_ [module name])
- (let [tag (tag$ [module name])]
- (case (plist\value name slot_pairings)
- (#Some binding) [tag binding]
- #None [tag g!_]))))
- tags))]]
+ pattern (|> tags
+ (list\each (: (-> Name (List Code))
+ (function (_ [module name])
+ (let [tag (tag$ [module name])]
+ (case (plist\value name slot_pairings)
+ (#Some binding) (list tag binding)
+ #None (list tag g!_))))))
+ list\conjoint
+ tuple$)]]
(in_meta (list& pattern body branches)))
_
@@ -5109,10 +5119,10 @@
(def: (scope_type_vars state)
(Meta (List Nat))
(case state
- {#info info #source source #current_module _ #modules modules
+ [#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
- #scope_type_vars scope_type_vars #eval _eval}
+ #scope_type_vars scope_type_vars #eval _eval]
(#Right [state scope_type_vars])))
(macro: .public (:parameter tokens)
diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux
index 58e7e4633..f74790dca 100644
--- a/stdlib/source/library/lux/abstract/monad/indexed.lux
+++ b/stdlib/source/library/lux/abstract/monad/indexed.lux
@@ -83,11 +83,11 @@
(#.Some name)
(let [name (code.local_identifier name)]
(` (let [(~ name) (~ monad)
- {#..in (~' in)
- #..then (~ g!then)} (~ name)]
+ [#..in (~' in)
+ #..then (~ g!then)] (~ name)]
(~ body))))
#.None
- (` (let [{#..in (~' in)
- #..then (~ g!then)} (~ monad)]
+ (` (let [[#..in (~' in)
+ #..then (~ g!then)] (~ monad)]
(~ body)))))))))
diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux
index 6f3f64403..7e8e04ba2 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -31,8 +31,8 @@
(type: Stack
(Record
- {#bottom (Maybe Code)
- #top (List Code)}))
+ [#bottom (Maybe Code)
+ #top (List Code)]))
(def: aliases^
(Parser (List Alias))
diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux
index 6d47288df..7353bad84 100644
--- a/stdlib/source/library/lux/control/concurrency/actor.lux
+++ b/stdlib/source/library/lux/control/concurrency/actor.lux
@@ -66,9 +66,9 @@
{}
(Record
- {#obituary [(Async <Obituary>)
+ [#obituary [(Async <Obituary>)
(Resolver <Obituary>)]
- #mailbox (Atom <Mailbox>)})
+ #mailbox (Atom <Mailbox>)])
(type: .public (Mail s)
<Mail>)
@@ -78,8 +78,8 @@
(type: .public (Behavior o s)
(Record
- {#on_init (-> o s)
- #on_mail (-> (Mail s) s (Actor s) (Async (Try s)))}))
+ [#on_init (-> o s)
+ #on_mail (-> (Mail s) s (Actor s) (Async (Try s)))]))
(def: .public (spawn! behavior init)
(All (_ o s) (-> (Behavior o s) o (IO (Actor s))))
@@ -89,8 +89,8 @@
behavior
(Actor s)
- (:abstraction {#obituary (async.async [])
- #mailbox (atom (async.async []))}))
+ (:abstraction [#obituary (async.async [])
+ #mailbox (atom (async.async []))]))
process (loop [state (on_init init)
[|mailbox| _] (io.run! (atom.read! (value@ #mailbox (:representation self))))]
(do {! async.monad}
@@ -204,8 +204,8 @@
(def: .public default
(All (_ s) (Behavior s s))
- {#on_init function.identity
- #on_mail ..default_on_mail})
+ [#on_init function.identity
+ #on_mail ..default_on_mail])
(def: .public (poison! actor)
(All (_ s) (-> (Actor s) (IO (Try Any))))
@@ -274,8 +274,8 @@
(def: (~ export_policy) (~ g!actor)
(All ((~ g!_) (~+ g!vars))
(..Behavior (~ state_type) ((~ g!type) (~+ g!vars))))
- {#..on_init (|>> ((~! abstract.:abstraction) (~ g!type)))
- #..on_mail (~ (..on_mail g!_ ?on_mail))})
+ [#..on_init (|>> ((~! abstract.:abstraction) (~ g!type)))
+ #..on_mail (~ (..on_mail g!_ ?on_mail))])
(~+ messages))))))))
@@ -284,18 +284,18 @@
(with_identifiers [g!_]
(in (list (` (: ((~! io.IO) (..Actor (~ state_type)))
(..spawn! (: (..Behavior (~ state_type) (~ state_type))
- {#..on_init (|>>)
- #..on_mail (~ (..on_mail g!_ ?on_mail))})
+ [#..on_init (|>>)
+ #..on_mail (~ (..on_mail g!_ ?on_mail))])
(: (~ state_type)
(~ init)))))))))
(type: Signature
(Record
- {#vars (List Text)
+ [#vars (List Text)
#name Text
#inputs (List |input|.Input)
#state Text
- #self Text}))
+ #self Text]))
(def: signature^
(Parser Signature)
diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux
index 963400278..53120a3c4 100644
--- a/stdlib/source/library/lux/control/concurrency/atom.lux
+++ b/stdlib/source/library/lux/control/concurrency/atom.lux
@@ -1,6 +1,7 @@
(.module:
[library
[lux #*
+ ["." macro]
["." ffi]
["@" target]
[abstract
@@ -15,11 +16,12 @@
[type
abstract]]])
-(with_expansions [<jvm> (as_is (ffi.import: (java/util/concurrent/atomic/AtomicReference a)
- ["#::."
- (new [a])
- (get [] a)
- (compareAndSet [a a] boolean)]))]
+(with_expansions [<jvm> (as_is (macro.log_single_expansion!
+ (ffi.import: (java/util/concurrent/atomic/AtomicReference a)
+ ["#::."
+ (new [a])
+ (get [] a)
+ (compareAndSet [a a] boolean)])))]
(for {@.old <jvm>
@.jvm <jvm>}
(as_is)))
diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux
index f0ff9d7ba..64f3c4af4 100644
--- a/stdlib/source/library/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux
@@ -26,9 +26,9 @@
(type: State
(Record
- {#max_positions Nat
+ [#max_positions Nat
#open_positions Int
- #waiting_list (Queue (Resolver Any))}))
+ #waiting_list (Queue (Resolver Any))]))
(abstract: .public Semaphore
{}
@@ -42,9 +42,9 @@
(-> Nat Semaphore)
(let [max_positions (n.min initial_open_positions
..most_positions_possible)]
- (:abstraction (atom.atom {#max_positions max_positions
+ (:abstraction (atom.atom [#max_positions max_positions
#open_positions (.int max_positions)
- #waiting_list queue.empty}))))
+ #waiting_list queue.empty]))))
(def: .public (wait! semaphore)
(Ex (_ k) (-> Semaphore (Async Any)))
@@ -132,17 +132,17 @@
{}
(Record
- {#limit Limit
+ [#limit Limit
#count (Atom Nat)
#start_turnstile Semaphore
- #end_turnstile Semaphore})
+ #end_turnstile Semaphore])
(def: .public (barrier limit)
(-> Limit Barrier)
- (:abstraction {#limit limit
+ (:abstraction [#limit limit
#count (atom.atom 0)
#start_turnstile (..semaphore 0)
- #end_turnstile (..semaphore 0)}))
+ #end_turnstile (..semaphore 0)]))
(def: (un_block! times turnstile)
(-> Nat Semaphore (Async Any))
diff --git a/stdlib/source/library/lux/control/concurrency/stm.lux b/stdlib/source/library/lux/control/concurrency/stm.lux
index d8bb2568b..523227a27 100644
--- a/stdlib/source/library/lux/control/concurrency/stm.lux
+++ b/stdlib/source/library/lux/control/concurrency/stm.lux
@@ -77,9 +77,9 @@
(type: (Tx_Frame a)
(Record
- {#var (Var a)
+ [#var (Var a)
#original a
- #current a}))
+ #current a]))
(type: Tx
(List (Ex (_ a) (Tx_Frame a))))
@@ -118,13 +118,13 @@
(#.Item [_var _original _current] tx')
(if (same? (:as (Var Any) var)
(:as (Var Any) _var))
- (#.Item {#var (:as (Var Any) _var)
+ (#.Item [#var (:as (Var Any) _var)
#original (:as Any _original)
- #current (:as Any value)}
+ #current (:as Any value)]
tx')
- (#.Item {#var _var
+ (#.Item [#var _var
#original _original
- #current _current}
+ #current _current]
(with_updated_var var value tx')))))
(def: .public (write value var)
diff --git a/stdlib/source/library/lux/control/concurrency/thread.lux b/stdlib/source/library/lux/control/concurrency/thread.lux
index 603b44da8..e3a5606c3 100644
--- a/stdlib/source/library/lux/control/concurrency/thread.lux
+++ b/stdlib/source/library/lux/control/concurrency/thread.lux
@@ -60,9 +60,9 @@
... Default
(type: Thread
(Record
- {#creation Nat
+ [#creation Nat
#delay Nat
- #action (IO Any)}))
+ #action (IO Any)]))
))
(def: .public parallelism
@@ -129,9 +129,9 @@
... Default
(do {! io.monad}
[now (\ ! each (|>> instant.millis .nat) instant.now)
- _ (atom.update! (|>> (#.Item {#creation now
+ _ (atom.update! (|>> (#.Item [#creation now
#delay milli_seconds
- #action action}))
+ #action action]))
..runner)]
(in [])))))
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 4998142f7..17de72095 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -28,8 +28,8 @@
(type: .public (Exception a)
(Record
- {#label Text
- #constructor (-> a Text)}))
+ [#label Text
+ #constructor (-> a Text)]))
(def: .public (match? exception error)
(All (_ e) (-> (Exception e) Text Bit))
@@ -101,10 +101,10 @@
(All ((~ g!_) (~+ (list\each |type_variable|.format t_vars)))
(..Exception [(~+ (list\each (value@ #|input|.type) inputs))]))
(let [(~ g!descriptor) (~ (code.text descriptor))]
- {#..label (~ g!descriptor)
+ [#..label (~ g!descriptor)
#..constructor (function ((~ g!self) [(~+ (list\each (value@ #|input|.binding) inputs))])
((~! text\composite) (~ g!descriptor)
- (~ (maybe.else (' "") body))))}))))))))
+ (~ (maybe.else (' "") body))))]))))))))
(def: (report' entries)
(-> (List [Text Text]) Text)
diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux
index 5ef853829..f303eff44 100644
--- a/stdlib/source/library/lux/control/function/mutual.lux
+++ b/stdlib/source/library/lux/control/function/mutual.lux
@@ -26,9 +26,9 @@
(type: Mutual
(Record
- {#declaration Declaration
+ [#declaration Declaration
#type Code
- #body Code}))
+ #body Code]))
(.def: mutual
(Parser [Declaration Code Code])
@@ -97,8 +97,8 @@
(type: Definition
(Record
- {#export_policy Code
- #mutual Mutual}))
+ [#export_policy Code
+ #mutual Mutual]))
(.def: definition
(Parser Definition)
diff --git a/stdlib/source/library/lux/control/parser/text.lux b/stdlib/source/library/lux/control/parser/text.lux
index 5943fba26..e19eb72a4 100644
--- a/stdlib/source/library/lux/control/parser/text.lux
+++ b/stdlib/source/library/lux/control/parser/text.lux
@@ -32,8 +32,8 @@
(type: .public Slice
(Record
- {#basis Offset
- #distance Offset}))
+ [#basis Offset
+ #distance Offset]))
(def: (left_over offset tape)
(-> Offset Text Text)
@@ -77,8 +77,8 @@
(in (list\mix (function (_ [slice::basis slice::distance]
[total::basis total::distance])
[total::basis ("lux i64 +" slice::distance total::distance)])
- {#basis offset
- #distance 0}
+ [#basis offset
+ #distance 0]
slices))))
(def: .public any
@@ -97,8 +97,8 @@
(case (/.char offset tape)
(#.Some _)
(#try.Success [[("lux i64 +" 1 offset) tape]
- {#basis offset
- #distance 1}])
+ [#basis offset
+ #distance 1]])
_
(exception.except ..cannot_slice []))))
@@ -230,8 +230,8 @@
(let [output' (/.of_char output)]
(if (<modifier> (/.contains? output' options))
(#try.Success [[("lux i64 +" 1 offset) tape]
- {#basis offset
- #distance 1}])
+ [#basis offset
+ #distance 1]])
(exception.except <exception> [options output])))
_
diff --git a/stdlib/source/library/lux/control/security/policy.lux b/stdlib/source/library/lux/control/security/policy.lux
index c9e840698..44d233cde 100644
--- a/stdlib/source/library/lux/control/security/policy.lux
+++ b/stdlib/source/library/lux/control/security/policy.lux
@@ -21,8 +21,8 @@
(type: .public (Privilege brand label)
(Record
- {#can_upgrade (Can_Upgrade brand label)
- #can_downgrade (Can_Downgrade brand label)}))
+ [#can_upgrade (Can_Upgrade brand label)
+ #can_downgrade (Can_Downgrade brand label)]))
(type: .public (Delegation brand from to)
(All (_ value)
@@ -41,8 +41,8 @@
(def: privilege
Privilege
- {#can_upgrade (|>> :abstraction)
- #can_downgrade (|>> :representation)})
+ [#can_upgrade (|>> :abstraction)
+ #can_downgrade (|>> :representation)])
(def: .public (with_policy context)
(All (_ brand scope)
diff --git a/stdlib/source/library/lux/control/writer.lux b/stdlib/source/library/lux/control/writer.lux
index b933c4388..771bb95a5 100644
--- a/stdlib/source/library/lux/control/writer.lux
+++ b/stdlib/source/library/lux/control/writer.lux
@@ -10,8 +10,8 @@
(type: .public (Writer log value)
(Record
- {#log log
- #value value}))
+ [#log log
+ #value value]))
(def: .public (write message)
(All (_ log) (-> log (Writer log Any)))
diff --git a/stdlib/source/library/lux/data/collection/dictionary.lux b/stdlib/source/library/lux/data/collection/dictionary.lux
index ad65dabbd..becef793e 100644
--- a/stdlib/source/library/lux/data/collection/dictionary.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary.lux
@@ -560,8 +560,8 @@
(type: .public (Dictionary k v)
(Record
- {#hash (Hash k)
- #root (Node k v)}))
+ [#hash (Hash k)
+ #root (Node k v)]))
(def: .public key_hash
(All (_ k v) (-> (Dictionary k v) (Hash k)))
@@ -569,8 +569,8 @@
(def: .public (empty key_hash)
(All (_ k v) (-> (Hash k) (Dictionary k v)))
- {#hash key_hash
- #root empty_node})
+ [#hash key_hash
+ #root empty_node])
(def: .public (has key val dict)
(All (_ k v) (-> k v (Dictionary k v) (Dictionary k v)))
diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
index acb2599f2..81096ddef 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
@@ -25,20 +25,20 @@
(type: (Node k v)
(Record
- {#color Color
+ [#color Color
#key k
#value v
#left (Maybe (Node k v))
- #right (Maybe (Node k v))}))
+ #right (Maybe (Node k v))]))
(template [<create> <color>]
[(def: (<create> key value left right)
(All (_ k v) (-> k v (Maybe (Node k v)) (Maybe (Node k v)) (Node k v)))
- {#color <color>
+ [#color <color>
#key key
#value value
#left left
- #right right})]
+ #right right])]
[red #Red]
[black #Black]
@@ -46,13 +46,13 @@
(type: .public (Dictionary k v)
(Record
- {#&order (Order k)
- #root (Maybe (Node k v))}))
+ [#&order (Order k)
+ #root (Maybe (Node k v))]))
(def: .public (empty order)
(All (_ k v) (-> (Order k) (Dictionary k v)))
- {#&order order
- #root #.None})
+ [#&order order
+ #root #.None])
... TODO: Doing inneficient access of Order functions due to compiler bug.
... TODO: Must improve it as soon as bug is fixed.
diff --git a/stdlib/source/library/lux/data/collection/queue.lux b/stdlib/source/library/lux/data/collection/queue.lux
index 524c14067..deb07edb2 100644
--- a/stdlib/source/library/lux/data/collection/queue.lux
+++ b/stdlib/source/library/lux/data/collection/queue.lux
@@ -13,18 +13,18 @@
(type: .public (Queue a)
(Record
- {#front (List a)
- #rear (List a)}))
+ [#front (List a)
+ #rear (List a)]))
(def: .public empty
Queue
- {#front (.list)
- #rear (.list)})
+ [#front (.list)
+ #rear (.list)])
(def: .public (of_list entries)
(All (_ a) (-> (List a) (Queue a)))
- {#front entries
- #rear (.list)})
+ [#front entries
+ #rear (.list)])
(def: .public (list queue)
(All (_ a) (-> (Queue a) (List a)))
@@ -90,5 +90,5 @@
(Functor Queue)
(def: (each f fa)
- {#front (|> fa (value@ #front) (list\each f))
- #rear (|> fa (value@ #rear) (list\each f))}))
+ [#front (|> fa (value@ #front) (list\each f))
+ #rear (|> fa (value@ #rear) (list\each f))]))
diff --git a/stdlib/source/library/lux/data/collection/row.lux b/stdlib/source/library/lux/data/collection/row.lux
index 59f48d867..6c04e7dd4 100644
--- a/stdlib/source/library/lux/data/collection/row.lux
+++ b/stdlib/source/library/lux/data/collection/row.lux
@@ -191,17 +191,17 @@
(type: .public (Row a)
(Record
- {#level Level
+ [#level Level
#size Nat
#root (Hierarchy a)
- #tail (Base a)}))
+ #tail (Base a)]))
(def: .public empty
Row
- {#level (level_up root_level)
+ [#level (level_up root_level)
#size 0
#root (empty_hierarchy [])
- #tail (array.empty 0)})
+ #tail (array.empty 0)])
(def: .public (size row)
(All (_ a) (-> (Row a) Nat))
@@ -439,10 +439,10 @@
(Functor Row)
(def: (each f xs)
- {#level (value@ #level xs)
+ [#level (value@ #level xs)
#size (value@ #size xs)
#root (|> xs (value@ #root) (array\each (\ node_functor each f)))
- #tail (|> xs (value@ #tail) (array\each f))}))
+ #tail (|> xs (value@ #tail) (array\each f))]))
(implementation: .public apply
(Apply Row)
diff --git a/stdlib/source/library/lux/data/collection/tree.lux b/stdlib/source/library/lux/data/collection/tree.lux
index d16d02c74..26c385f7e 100644
--- a/stdlib/source/library/lux/data/collection/tree.lux
+++ b/stdlib/source/library/lux/data/collection/tree.lux
@@ -18,8 +18,8 @@
(type: .public (Tree a)
(Record
- {#value a
- #children (List (Tree a))}))
+ [#value a
+ #children (List (Tree a))]))
(def: .public (flat tree)
(All (_ a) (-> (Tree a) (List a)))
@@ -31,13 +31,13 @@
(def: .public (leaf value)
(All (_ a) (-> a (Tree a)))
- {#value value
- #children (list)})
+ [#value value
+ #children (list)])
(def: .public (branch value children)
(All (_ a) (-> a (List (Tree a)) (Tree a)))
- {#value value
- #children children})
+ [#value value
+ #children children])
(type: Tree_Code
(Rec Tree_Code
@@ -56,8 +56,8 @@
(syntax: .public (tree [root tree^])
(in (list (` (~ (loop [[value children] root]
- (` {#value (~ value)
- #children (list (~+ (list\each recur children)))})))))))
+ (` [#value (~ value)
+ #children (list (~+ (list\each recur children)))])))))))
(implementation: .public (equivalence super)
(All (_ a) (-> (Equivalence a) (Equivalence (Tree a))))
@@ -70,9 +70,9 @@
(Functor Tree)
(def: (each f fa)
- {#value (f (value@ #value fa))
+ [#value (f (value@ #value fa))
#children (list\each (each f)
- (value@ #children fa))}))
+ (value@ #children fa))]))
(implementation: .public mix
(Mix Tree)
diff --git a/stdlib/source/library/lux/data/collection/tree/finger.lux b/stdlib/source/library/lux/data/collection/tree/finger.lux
index b8313112c..c675916aa 100644
--- a/stdlib/source/library/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/library/lux/data/collection/tree/finger.lux
@@ -15,10 +15,10 @@
{}
(Record
- {#monoid (Monoid t)
+ [#monoid (Monoid t)
#tag t
#root (Or v
- [(Tree @ t v) (Tree @ t v)])})
+ [(Tree @ t v) (Tree @ t v)])])
(type: .public (Builder @ t)
(Interface
@@ -45,15 +45,15 @@
(def: (leaf tag value)
(:abstraction
- {#monoid monoid
+ [#monoid monoid
#tag tag
- #root (0 #0 value)}))
+ #root (0 #0 value)]))
(def: (branch left right)
(:abstraction
- {#monoid monoid
+ [#monoid monoid
#tag (\ monoid composite (..tag left) (..tag right))
- #root (0 #1 [left right])})))
+ #root (0 #1 [left right])])))
(def: .public (value tree)
(All (_ @ t v) (-> (Tree @ t v) v))
diff --git a/stdlib/source/library/lux/data/collection/tree/zipper.lux b/stdlib/source/library/lux/data/collection/tree/zipper.lux
index 7f168c2d3..15265bf94 100644
--- a/stdlib/source/library/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/library/lux/data/collection/tree/zipper.lux
@@ -19,15 +19,15 @@
(type: (Family Zipper a)
(Record
- {#parent (Zipper a)
+ [#parent (Zipper a)
#lefts (List (Tree a))
- #rights (List (Tree a))}))
+ #rights (List (Tree a))]))
... https://en.wikipedia.org/wiki/Zipper_(data_structure)
(type: .public (Zipper a)
(Record
- {#family (Maybe (Family Zipper a))
- #node (Tree a)}))
+ [#family (Maybe (Family Zipper a))
+ #node (Tree a)]))
(implementation: .public (equivalence super)
(All (_ a)
@@ -46,8 +46,8 @@
(def: .public (zipper tree)
(All (_ a) (-> (Tree a) (Zipper a)))
- {#family #.None
- #node tree})
+ [#family #.None
+ #node tree])
(def: .public tree
(All (_ a) (-> (Zipper a) (Tree a)))
@@ -93,10 +93,10 @@
#.None
(#.Item head tail)
- (#.Some {#family (#.Some {#parent (with@ [#node #//.children] (list) zipper)
+ (#.Some [#family (#.Some [#parent (with@ [#node #//.children] (list) zipper)
#lefts #.End
- #rights tail})
- #node head})))
+ #rights tail])
+ #node head])))
(def: .public (up zipper)
(All (_ a) (-> (Zipper a) (Maybe (Zipper a))))
@@ -124,16 +124,16 @@
(case (value@ <side> family)
(#.Item next side')
(#.Some (for {@.old
- {#family (#.Some (|> family
+ [#family (#.Some (|> family
(with@ <side> side')
(revised@ <op_side> (|>> (#.Item (value@ #node zipper))))))
- #node next}}
+ #node next]}
(let [move (: (All (_ a) (-> (List (Tree a)) (Zipper a) (Family Zipper a) (Family Zipper a)))
(function (_ side' zipper)
(|>> (with@ <side> side')
(revised@ <op_side> (|>> (#.Item (value@ #node zipper)))))))]
- {#family (#.Some (move side' zipper family))
- #node next})))
+ [#family (#.Some (move side' zipper family))
+ #node next])))
#.End
#.None)
@@ -153,18 +153,18 @@
#.None
(#.Item last prevs)
- (#.Some (for {@.old {#family (#.Some (|> family
+ (#.Some (for {@.old [#family (#.Some (|> family
(with@ <side> #.End)
(revised@ <op_side> (|>> (#.Item (value@ #node zipper))
(list\composite prevs)))))
- #node last}}
+ #node last]}
(let [move (: (All (_ a) (-> (List (Tree a)) (Zipper a) (Family Zipper a) (Family Zipper a)))
(function (_ prevs zipper)
(|>> (with@ <side> #.End)
(revised@ <op_side> (|>> (#.Item (value@ #node zipper))
(list\composite prevs))))))]
- {#family (#.Some (move prevs zipper family))
- #node last}))))))]
+ [#family (#.Some (move prevs zipper family))
+ #node last]))))))]
[right rightmost #rights #lefts]
[left leftmost #lefts #rights]
@@ -293,12 +293,12 @@
(Functor Zipper)
(def: (each f (^slots [#family #node]))
- {#family (maybe\each (function (_ (^slots [#parent #lefts #rights]))
- {#parent (each f parent)
+ [#family (maybe\each (function (_ (^slots [#parent #lefts #rights]))
+ [#parent (each f parent)
#lefts (list\each (//\each f) lefts)
- #rights (list\each (//\each f) rights)})
+ #rights (list\each (//\each f) rights)])
family)
- #node (//\each f node)}))
+ #node (//\each f node)]))
(implementation: .public comonad
(CoMonad Zipper)
@@ -310,13 +310,13 @@
(def: (disjoint (^slots [#family #node]))
(let [tree_splitter (: (All (_ a) (-> (Tree a) (Tree (Zipper a))))
(function (tree_splitter tree)
- {#//.value (..zipper tree)
+ [#//.value (..zipper tree)
#//.children (|> tree
(value@ #//.children)
- (list\each tree_splitter))}))]
- {#family (maybe\each (function (_ (^slots [#parent #lefts #rights]))
- {#parent (disjoint parent)
+ (list\each tree_splitter))]))]
+ [#family (maybe\each (function (_ (^slots [#parent #lefts #rights]))
+ [#parent (disjoint parent)
#lefts (list\each tree_splitter lefts)
- #rights (list\each tree_splitter rights)})
+ #rights (list\each tree_splitter rights)])
family)
- #node (tree_splitter node)})))
+ #node (tree_splitter node)])))
diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux
index f688297f2..11c31b184 100644
--- a/stdlib/source/library/lux/data/color.lux
+++ b/stdlib/source/library/lux/data/color.lux
@@ -37,19 +37,19 @@
(type: .public RGB
(Record
- {#red Nat
+ [#red Nat
#green Nat
- #blue Nat}))
+ #blue Nat]))
(type: .public HSL
[Frac Frac Frac])
(type: .public CMYK
(Record
- {#cyan Frac
+ [#cyan Frac
#magenta Frac
#yellow Frac
- #key Frac}))
+ #key Frac]))
(type: .public HSB
[Frac Frac Frac])
@@ -61,9 +61,9 @@
(def: .public (of_rgb [red green blue])
(-> RGB Color)
- (:abstraction {#red (n.% ..rgb_limit red)
+ (:abstraction [#red (n.% ..rgb_limit red)
#green (n.% ..rgb_limit green)
- #blue (n.% ..rgb_limit blue)}))
+ #blue (n.% ..rgb_limit blue)]))
(def: .public rgb
(-> Color RGB)
@@ -93,15 +93,15 @@
(def: .public black
Color
- (..of_rgb {#red 0
+ (..of_rgb [#red 0
#green 0
- #blue 0}))
+ #blue 0]))
(def: .public white
Color
- (..of_rgb {#red ..top
+ (..of_rgb [#red ..top
#green ..top
- #blue ..top}))
+ #blue ..top]))
(implementation: .public addition
(Monoid Color)
@@ -111,9 +111,9 @@
(def: (composite left right)
(let [[lR lG lB] (:representation left)
[rR rG rB] (:representation right)]
- (:abstraction {#red (n.max lR rR)
+ (:abstraction [#red (n.max lR rR)
#green (n.max lG rG)
- #blue (n.max lB rB)}))))
+ #blue (n.max lB rB)]))))
(def: (opposite_intensity value)
(-> Nat Nat)
@@ -122,9 +122,9 @@
(def: .public (complement color)
(-> Color Color)
(let [[red green blue] (:representation color)]
- (:abstraction {#red (opposite_intensity red)
+ (:abstraction [#red (opposite_intensity red)
#green (opposite_intensity green)
- #blue (opposite_intensity blue)})))
+ #blue (opposite_intensity blue)])))
(implementation: .public subtraction
(Monoid Color)
@@ -134,9 +134,9 @@
(def: (composite left right)
(let [[lR lG lB] (:representation (..complement left))
[rR rG rB] (:representation right)]
- (:abstraction {#red (n.min lR rR)
+ (:abstraction [#red (n.min lR rR)
#green (n.min lG rG)
- #blue (n.min lB rB)}))))
+ #blue (n.min lB rB)]))))
)
(def: .public (hsl color)
@@ -198,18 +198,18 @@
(if (f.= +0.0 saturation)
... Achromatic
(let [intensity (..up luminance)]
- (of_rgb {#red intensity
+ (of_rgb [#red intensity
#green intensity
- #blue intensity}))
+ #blue intensity]))
... Chromatic
(let [q (if (f.< +0.5 luminance)
(|> saturation (f.+ +1.0) (f.* luminance))
(|> luminance (f.+ saturation) (f.- (f.* saturation luminance))))
p (|> luminance (f.* +2.0) (f.- q))
third (|> +1.0 (f./ +3.0))]
- (of_rgb {#red (|> hue (f.+ third) (hue_rgb p q))
+ (of_rgb [#red (|> hue (f.+ third) (hue_rgb p q))
#green (|> hue (hue_rgb p q))
- #blue (|> hue (f.- third) (hue_rgb p q))}))))
+ #blue (|> hue (f.- third) (hue_rgb p q))]))))
(def: .public (hsb color)
(-> Color HSB)
@@ -256,9 +256,9 @@
red (case mod 0 v 1 q 2 p 3 p 4 t 5 v _ (undefined))
green (case mod 0 t 1 v 2 v 3 q 4 p 5 p _ (undefined))
blue (case mod 0 p 1 p 2 t 3 v 4 v 5 q _ (undefined))]
- (of_rgb {#red (..up red)
+ (of_rgb [#red (..up red)
#green (..up green)
- #blue (..up blue)})))
+ #blue (..up blue)])))
(def: .public (cmyk color)
(-> Color CMYK)
@@ -273,26 +273,26 @@
cyan (|> +1.0 (f.- red) (f.- key) (f.* f))
magenta (|> +1.0 (f.- green) (f.- key) (f.* f))
yellow (|> +1.0 (f.- blue) (f.- key) (f.* f))]
- {#cyan cyan
+ [#cyan cyan
#magenta magenta
#yellow yellow
- #key key}))
+ #key key]))
(def: .public (of_cmyk [cyan magenta yellow key])
(-> CMYK Color)
(if (f.= +1.0 key)
- (of_rgb {#red 0
+ (of_rgb [#red 0
#green 0
- #blue 0})
+ #blue 0])
(let [red (|> (|> +1.0 (f.- cyan))
(f.* (|> +1.0 (f.- key))))
green (|> (|> +1.0 (f.- magenta))
(f.* (|> +1.0 (f.- key))))
blue (|> (|> +1.0 (f.- yellow))
(f.* (|> +1.0 (f.- key))))]
- (of_rgb {#red (..up red)
+ (of_rgb [#red (..up red)
#green (..up green)
- #blue (..up blue)}))))
+ #blue (..up blue)]))))
(def: (normal ratio)
(-> Frac Frac)
@@ -317,9 +317,9 @@
.nat)))
[redS greenS blueS] (rgb start)
[redE greenE blueE] (rgb end)]
- (of_rgb {#red (interpolated' redE redS)
+ (of_rgb [#red (interpolated' redE redS)
#green (interpolated' greenE greenS)
- #blue (interpolated' blueE blueS)})))
+ #blue (interpolated' blueE blueS)])))
(template [<name> <target>]
[(def: .public (<name> ratio color)
@@ -432,5 +432,5 @@
(type: .public Pigment
(Record
- {#color Color
- #alpha Alpha}))
+ [#color Color
+ #alpha Alpha]))
diff --git a/stdlib/source/library/lux/data/color/named.lux b/stdlib/source/library/lux/data/color/named.lux
index 43fd25f16..5d6a92463 100644
--- a/stdlib/source/library/lux/data/color/named.lux
+++ b/stdlib/source/library/lux/data/color/named.lux
@@ -8,9 +8,9 @@
(template [<red> <green> <blue> <name>]
[(`` (def: .public <name>
Color
- (//.of_rgb {#//.red (hex <red>)
+ (//.of_rgb [#//.red (hex <red>)
#//.green (hex <green>)
- #//.blue (hex <blue>)})))]
+ #//.blue (hex <blue>)])))]
["F0" "F8" "FF" alice_blue]
["FA" "EB" "D7" antique_white]
diff --git a/stdlib/source/library/lux/data/format/css.lux b/stdlib/source/library/lux/data/format/css.lux
index 57a7d33de..36c94ef17 100644
--- a/stdlib/source/library/lux/data/format/css.lux
+++ b/stdlib/source/library/lux/data/format/css.lux
@@ -88,8 +88,8 @@
(type: .public Frame
(Record
- {#when Percentage
- #what Style}))
+ [#when Percentage
+ #what Style]))
(def: .public (key_frames animation frames)
(-> (Value Animation) (List Frame) (CSS Special))
diff --git a/stdlib/source/library/lux/data/format/css/font.lux b/stdlib/source/library/lux/data/format/css/font.lux
index 2ebe6644d..198621e16 100644
--- a/stdlib/source/library/lux/data/format/css/font.lux
+++ b/stdlib/source/library/lux/data/format/css/font.lux
@@ -15,14 +15,14 @@
(type: .public Unicode_Range
(Record
- {#start Nat
- #end Nat}))
+ [#start Nat
+ #end Nat]))
(type: .public Font
(Record
- {#family Text
+ [#family Text
#source URL
#stretch (Maybe (Value Font_Stretch))
#style (Maybe (Value Font_Style))
#weight (Maybe (Value Font_Weight))
- #unicode_range (Maybe Unicode_Range)}))
+ #unicode_range (Maybe Unicode_Range)]))
diff --git a/stdlib/source/library/lux/data/format/css/selector.lux b/stdlib/source/library/lux/data/format/css/selector.lux
index a1f801779..f8aab3f86 100644
--- a/stdlib/source/library/lux/data/format/css/selector.lux
+++ b/stdlib/source/library/lux/data/format/css/selector.lux
@@ -182,8 +182,8 @@
(type: .public Formula
(Record
- {#constant Int
- #variable Int}))
+ [#constant Int
+ #variable Int]))
(def: .public (formula input)
(-> Formula Index)
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux
index 20b15f0eb..e49398298 100644
--- a/stdlib/source/library/lux/data/format/css/value.lux
+++ b/stdlib/source/library/lux/data/format/css/value.lux
@@ -1124,10 +1124,10 @@
(type: .public Rectangle
(Record
- {#top (Value Length)
+ [#top (Value Length)
#right (Value Length)
#bottom (Value Length)
- #left (Value Length)}))
+ #left (Value Length)]))
(def: .public (clip rectangle)
(-> Rectangle (Value Clip))
diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux
index bc17e00f6..b47416398 100644
--- a/stdlib/source/library/lux/data/format/html.lux
+++ b/stdlib/source/library/lux/data/format/html.lux
@@ -226,8 +226,8 @@
(type: .public Coord
(Record
- {#horizontal Nat
- #vertical Nat}))
+ [#horizontal Nat
+ #vertical Nat]))
(def: metric_separator ",")
(def: coord_separator ",")
@@ -238,20 +238,20 @@
(type: .public Rectangle
(Record
- {#start Coord
- #end Coord}))
+ [#start Coord
+ #end Coord]))
(type: .public Circle
(Record
- {#center Coord
- #radius Nat}))
+ [#center Coord
+ #radius Nat]))
(type: .public Polygon
(Record
- {#first Coord
+ [#first Coord
#second Coord
#third Coord
- #extra (List Coord)}))
+ #extra (List Coord)]))
(def: (%rectangle [start end])
(Format Rectangle)
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index 6aeaa6539..6450bdf01 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -564,13 +564,13 @@
(type: .public Owner
(Record
- {#name Name
- #id ID}))
+ [#name Name
+ #id ID]))
(type: .public Ownership
(Record
- {#user Owner
- #group Owner}))
+ [#user Owner
+ #group Owner]))
(type: .public File
[Path Instant Mode Ownership Content])
@@ -612,7 +612,7 @@
(type: Header
(Record
- {#path Path
+ [#path Path
#mode Mode
#user_id ID
#group_id ID
@@ -625,7 +625,7 @@
#user_name Name
#group_name Name
#major_device Device
- #minor_device Device}))
+ #minor_device Device]))
(def: header_writer'
(Writer Header)
@@ -671,7 +671,7 @@
writer ($_ format.and
..header_writer
(format.segment (..rounded_content_size size)))]
- (writer [{#path path
+ (writer [[#path path
#mode mode
#user_id (value@ [#user #id] ownership)
#group_id (value@ [#group #id] ownership)
@@ -684,7 +684,7 @@
#user_name (value@ [#user #name] ownership)
#group_name (value@ [#group #name] ownership)
#major_device ..no_device
- #minor_device ..no_device}
+ #minor_device ..no_device]
content]))))
(def: normal_file_writer
@@ -698,7 +698,7 @@
(def: (symbolic_link_writer path)
(Writer Path)
(..header_writer
- {#path ..no_path
+ [#path ..no_path
#mode ..none
#user_id ..no_id
#group_id ..no_id
@@ -711,12 +711,12 @@
#user_name ..anonymous
#group_name ..anonymous
#major_device ..no_device
- #minor_device ..no_device}))
+ #minor_device ..no_device]))
(def: (directory_writer path)
(Writer Path)
(..header_writer
- {#path path
+ [#path path
#mode ..none
#user_id ..no_id
#group_id ..no_id
@@ -729,7 +729,7 @@
#user_name ..anonymous
#group_name ..anonymous
#major_device ..no_device
- #minor_device ..no_device}))
+ #minor_device ..no_device]))
(def: entry_writer
(Writer Entry)
@@ -799,7 +799,7 @@
major_device ..small_parser
minor_device ..small_parser
_ (<binary>.segment ..header_padding_size)]
- (in {#path path
+ (in [#path path
#mode mode
#user_id user_id
#group_id group_id
@@ -812,7 +812,7 @@
#user_name user_name
#group_name group_name
#major_device major_device
- #minor_device minor_device})))
+ #minor_device minor_device])))
(exception: .public (wrong_link_flag {expected Link_Flag} {actual Link_Flag})
(exception.report
@@ -839,10 +839,10 @@
(duration.up (|> duration.second duration.millis .nat))
instant.absolute)
(value@ #mode header)
- {#user {#name (value@ #user_name header)
- #id (value@ #user_id header)}
- #group {#name (value@ #group_name header)
- #id (value@ #group_id header)}}
+ [#user [#name (value@ #user_name header)
+ #id (value@ #user_id header)]
+ #group [#name (value@ #group_name header)
+ #id (value@ #group_id header)]]
content])))
(def: (file_name_parser expected extractor)
diff --git a/stdlib/source/library/lux/data/store.lux b/stdlib/source/library/lux/data/store.lux
index 24f7005fd..de09fe022 100644
--- a/stdlib/source/library/lux/data/store.lux
+++ b/stdlib/source/library/lux/data/store.lux
@@ -9,13 +9,13 @@
(type: .public (Store s a)
(Record
- {#cursor s
- #peek (-> s a)}))
+ [#cursor s
+ #peek (-> s a)]))
(def: (extend f wa)
(All (_ s a b) (-> (-> (Store s a) b) (Store s a) (Store s b)))
- {#cursor (value@ #cursor wa)
- #peek (function (_ s) (f (with@ #cursor s wa)))})
+ [#cursor (value@ #cursor wa)
+ #peek (function (_ s) (f (with@ #cursor s wa)))])
(implementation: .public functor
(All (_ s) (Functor (Store s)))
diff --git a/stdlib/source/library/lux/data/trace.lux b/stdlib/source/library/lux/data/trace.lux
index 35d97e9f9..b0819574c 100644
--- a/stdlib/source/library/lux/data/trace.lux
+++ b/stdlib/source/library/lux/data/trace.lux
@@ -9,8 +9,8 @@
(type: .public (Trace t a)
(Record
- {#monoid (Monoid t)
- #trace (-> t a)}))
+ [#monoid (Monoid t)
+ #trace (-> t a)]))
(implementation: .public functor
(All (_ t) (Functor (Trace t)))
@@ -29,12 +29,12 @@
(def: (disjoint wa)
(let [monoid (value@ #monoid wa)]
- {#monoid monoid
+ [#monoid monoid
#trace (function (_ t1)
- {#monoid monoid
+ [#monoid monoid
#trace (function (_ t2)
((value@ #trace wa)
- (\ monoid composite t1 t2)))})})))
+ (\ monoid composite t1 t2)))])])))
(def: .public (result context tracer)
(All (_ t a) (-> t (Trace t a) a))
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index 1c5150f41..d11d897d0 100644
--- a/stdlib/source/library/lux/documentation.lux
+++ b/stdlib/source/library/lux/documentation.lux
@@ -312,7 +312,7 @@
(-> Nat [Text (List Text)] (List Text) Text Type Text)
(case tags
(^ (list single_tag))
- (format "{#" single_tag " " (type_definition' level type_function_info #.None module type) "}")
+ (format "(Record [#" single_tag " " (type_definition' level type_function_info #.None module type) "])")
_
(case type
@@ -563,34 +563,34 @@
(type: .public Definition
(Record
- {#definition Text
- #documentation (Markdown Block)}))
+ [#definition Text
+ #documentation (Markdown Block)]))
(type: .public Module
(Record
- {#module Text
+ [#module Text
#description Text
#expected (Set Text)
- #definitions (List Definition)}))
+ #definitions (List Definition)]))
(syntax: .public (default [[name parameters] ..declaration])
(let [[_ short] name]
(in (list (` (: (.List ..Definition)
- (list {#..definition (~ (code.text short))
+ (list [#..definition (~ (code.text short))
#..documentation ((~! ..minimal_definition_documentation)
((~ (code.identifier name))
- (~+ (list\each code.local_identifier parameters))))})))))))
+ (~+ (list\each code.local_identifier parameters))))])))))))
(syntax: .public (documentation: [[name parameters] ..declaration
extra (<>.some <code>.any)])
(let [[_ short] name]
(in (list (` (.def: .public (~ (code.local_identifier short))
(.List ..Definition)
- (.list {#..definition (~ (code.text short))
+ (.list [#..definition (~ (code.text short))
#..documentation ((~! ..definition_documentation)
((~ (code.identifier name))
(~+ (list\each code.local_identifier parameters)))
- (~+ extra))})))))))
+ (~+ extra))])))))))
(def: definitions_documentation
(-> (List Definition) (Markdown Block))
@@ -624,13 +624,13 @@
(do meta.monad
[expected (meta.exports name)]
(in (list (` (: (List Module)
- (list& {#..module (~ (code.text name))
+ (list& [#..module (~ (code.text name))
#..description (~ description)
#..expected ((~! ..expected)
(~ (code.text (|> expected
(list\each product.left)
..expected_format))))
- #..definitions ((~! list.together) (list (~+ definitions)))}
+ #..definitions ((~! list.together) (list (~+ definitions)))]
($_ (\ (~! list.monoid) (~' composite))
(: (List Module)
(\ (~! list.monoid) (~' identity)))
diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux
index b63c91b0c..a2334c5f7 100644
--- a/stdlib/source/library/lux/extension.lux
+++ b/stdlib/source/library/lux/extension.lux
@@ -21,11 +21,11 @@
(type: Declaration
(Record
- {#name Code
+ [#name Code
#label Text
#phase Text
#archive Text
- #inputs (List Code)}))
+ #inputs (List Code)]))
(def: (declaration default)
(-> Code (Parser Declaration))
diff --git a/stdlib/source/library/lux/ffi.js.lux b/stdlib/source/library/lux/ffi.js.lux
index 466807a53..1d25fab7d 100644
--- a/stdlib/source/library/lux/ffi.js.lux
+++ b/stdlib/source/library/lux/ffi.js.lux
@@ -86,12 +86,12 @@
(type: Common_Method
(Record
- {#name Text
+ [#name Text
#alias (Maybe Text)
#inputs (List Nullable)
#io? Bit
#try? Bit
- #output Nullable}))
+ #output Nullable]))
(type: Static_Method Common_Method)
(type: Virtual_Method Common_Method)
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index da46af60c..eac74c9f7 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -217,14 +217,14 @@
(type: Annotation
(Record
- {#ann_name Text
- #ann_params (List Annotation_Parameter)}))
+ [#ann_name Text
+ #ann_params (List Annotation_Parameter)]))
(type: Member_Declaration
(Record
- {#member_name Text
+ [#member_name Text
#member_privacy Privacy
- #member_anns (List Annotation)}))
+ #member_anns (List Annotation)]))
(type: FieldDecl
(Variant
@@ -233,10 +233,10 @@
(type: MethodDecl
(Record
- {#method_tvars (List (Type Var))
+ [#method_tvars (List (Type Var))
#method_inputs (List (Type Value))
#method_output (Type Return)
- #method_exs (List (Type Class))}))
+ #method_exs (List (Type Class))]))
(type: Method_Definition
(Variant
@@ -280,8 +280,8 @@
(type: Partial_Call
(Record
- {#pc_method Name
- #pc_args (List Code)}))
+ [#pc_method Name
+ #pc_args (List Code)]))
(type: ImportMethodKind
(Variant
@@ -290,31 +290,32 @@
(type: ImportMethodCommons
(Record
- {#import_member_mode Primitive_Mode
+ [#import_member_mode Primitive_Mode
#import_member_alias Text
#import_member_kind ImportMethodKind
#import_member_tvars (List (Type Var))
#import_member_args (List [Bit (Type Value)])
#import_member_maybe? Bit
#import_member_try? Bit
- #import_member_io? Bit}))
+ #import_member_io? Bit]))
(type: ImportConstructorDecl
- (Record{}))
+ (Record
+ []))
(type: ImportMethodDecl
(Record
- {#import_method_name Text
- #import_method_return (Type Return)}))
+ [#import_method_name Text
+ #import_method_return (Type Return)]))
(type: ImportFieldDecl
(Record
- {#import_field_mode Primitive_Mode
+ [#import_field_mode Primitive_Mode
#import_field_name Text
#import_field_static? Bit
#import_field_maybe? Bit
#import_field_setter? Bit
- #import_field_type (Type Value)}))
+ #import_field_type (Type Value)]))
(type: Import_Member_Declaration
(Variant
@@ -739,10 +740,10 @@
inputs (<code>.tuple (<>.some (..type^ total_vars)))
output (..return^ total_vars)
exs (..throws_decl^ total_vars)]
- (in [[name #PublicP anns] {#method_tvars tvars
+ (in [[name #PublicP anns] [#method_tvars tvars
#method_inputs inputs
#method_output output
- #method_exs exs}]))))
+ #method_exs exs]]))))
(def: state_modifier^
(Parser State)
@@ -800,9 +801,9 @@
exs (throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name constructor_method_name
+ (in [[#member_name constructor_method_name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#ConstructorMethod strict_fp? method_vars self_name arguments constructor_args body exs)]))))
(def: (virtual_method_def^ class_vars)
@@ -821,9 +822,9 @@
exs (throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#VirtualMethod final? strict_fp? method_vars self_name arguments return_type body exs)]))))
(def: overriden_method_def^
@@ -842,9 +843,9 @@
exs (throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy #PublicP
- #member_anns annotations}
+ #member_anns annotations]
(#OverridenMethod strict_fp? owner_class method_vars self_name arguments return_type body exs)]))))
(def: static_method_def^
@@ -861,9 +862,9 @@
exs (throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#StaticMethod strict_fp? method_vars arguments return_type body exs)]))))
(def: abstract_method_def^
@@ -878,9 +879,9 @@
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
annotations ..annotations^]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#AbstractMethod method_vars arguments return_type exs)]))))
(def: native_method_def^
@@ -895,9 +896,9 @@
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
annotations ..annotations^]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#NativeMethod method_vars arguments return_type exs)]))))
(def: (method_def^ class_vars)
@@ -952,15 +953,15 @@
?prim_mode (<>.maybe primitive_mode^)
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^]
- (in (#ConstructorDecl [{#import_member_mode (maybe.else #AutoPrM ?prim_mode)
+ (in (#ConstructorDecl [[#import_member_mode (maybe.else #AutoPrM ?prim_mode)
#import_member_alias (maybe.else "new" ?alias)
#import_member_kind #VirtualIMK
#import_member_tvars tvars
#import_member_args args
#import_member_maybe? maybe?
#import_member_try? try?
- #import_member_io? io?}
- {}]))
+ #import_member_io? io?]
+ []]))
))
(<code>.form (do <>.monad
[kind (: (Parser ImportMethodKind)
@@ -974,16 +975,16 @@
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^
return (..return^ total_vars)]
- (in (#MethodDecl [{#import_member_mode (maybe.else #AutoPrM ?prim_mode)
+ (in (#MethodDecl [[#import_member_mode (maybe.else #AutoPrM ?prim_mode)
#import_member_alias (maybe.else name ?alias)
#import_member_kind kind
#import_member_tvars tvars
#import_member_args args
#import_member_maybe? maybe?
#import_member_try? try?
- #import_member_io? io?}
- {#import_method_name name
- #import_method_return return}]))))
+ #import_member_io? io?]
+ [#import_method_name name
+ #import_method_return return]]))))
(<code>.form (do <>.monad
[static? (<>.parses? (<code>.this! (' "static")))
name <code>.local_identifier
@@ -991,12 +992,12 @@
gtype (..type^ owner_vars)
maybe? (<>.parses? (<code>.this! (' "?")))
setter? (<>.parses? (<code>.this! (' #!)))]
- (in (#FieldAccessDecl {#import_field_mode (maybe.else #AutoPrM ?prim_mode)
+ (in (#FieldAccessDecl [#import_field_mode (maybe.else #AutoPrM ?prim_mode)
#import_field_name name
#import_field_static? static?
#import_field_maybe? maybe?
#import_field_setter? setter?
- #import_field_type gtype}))))
+ #import_field_type gtype]))))
))
(def: bundle
diff --git a/stdlib/source/library/lux/ffi.lua.lux b/stdlib/source/library/lux/ffi.lua.lux
index b14c2ebe3..60e8a8d48 100644
--- a/stdlib/source/library/lux/ffi.lua.lux
+++ b/stdlib/source/library/lux/ffi.lua.lux
@@ -81,12 +81,12 @@
(type: Common_Method
(Record
- {#name Text
+ [#name Text
#alias (Maybe Text)
#inputs (List Nilable)
#io? Bit
#try? Bit
- #output Nilable}))
+ #output Nilable]))
(type: Static_Method Common_Method)
(type: Virtual_Method Common_Method)
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux
index 9140ddab8..2512530d4 100644
--- a/stdlib/source/library/lux/ffi.old.lux
+++ b/stdlib/source/library/lux/ffi.old.lux
@@ -118,8 +118,8 @@
(type: Class_Declaration
(Record
- {#class_name Text
- #class_params (List Type_Parameter)}))
+ [#class_name Text
+ #class_params (List Type_Parameter)]))
(type: StackFrame
(primitive "java/lang/StackTraceElement"))
@@ -129,22 +129,22 @@
(type: Super_Class_Decl
(Record
- {#super_class_name Text
- #super_class_params (List GenericType)}))
+ [#super_class_name Text
+ #super_class_params (List GenericType)]))
(type: AnnotationParam
[Text Code])
(type: Annotation
(Record
- {#ann_name Text
- #ann_params (List AnnotationParam)}))
+ [#ann_name Text
+ #ann_params (List AnnotationParam)]))
(type: Member_Declaration
(Record
- {#member_name Text
+ [#member_name Text
#member_privacy Privacy
- #member_anns (List Annotation)}))
+ #member_anns (List Annotation)]))
(type: FieldDecl
(Variant
@@ -153,15 +153,15 @@
(type: MethodDecl
(Record
- {#method_tvars (List Type_Parameter)
+ [#method_tvars (List Type_Parameter)
#method_inputs (List GenericType)
#method_output GenericType
- #method_exs (List GenericType)}))
+ #method_exs (List GenericType)]))
(type: ArgDecl
(Record
- {#arg_name Text
- #arg_type GenericType}))
+ [#arg_name Text
+ #arg_type GenericType]))
(type: ConstructorArg
[GenericType Code])
@@ -207,8 +207,8 @@
(type: Partial_Call
(Record
- {#pc_method Name
- #pc_args (List Code)}))
+ [#pc_method Name
+ #pc_args (List Code)]))
(type: ImportMethodKind
(Variant
@@ -217,32 +217,32 @@
(type: ImportMethodCommons
(Record
- {#import_member_mode Primitive_Mode
+ [#import_member_mode Primitive_Mode
#import_member_alias Text
#import_member_kind ImportMethodKind
#import_member_tvars (List Type_Parameter)
#import_member_args (List [Bit GenericType])
#import_member_maybe? Bit
#import_member_try? Bit
- #import_member_io? Bit}))
+ #import_member_io? Bit]))
(type: ImportConstructorDecl
(Record
- {}))
+ []))
(type: ImportMethodDecl
(Record
- {#import_method_name Text
- #import_method_return GenericType}))
+ [#import_method_name Text
+ #import_method_return GenericType]))
(type: ImportFieldDecl
(Record
- {#import_field_mode Primitive_Mode
+ [#import_field_mode Primitive_Mode
#import_field_name Text
#import_field_static? Bit
#import_field_maybe? Bit
#import_field_setter? Bit
- #import_field_type GenericType}))
+ #import_field_type GenericType]))
(type: Import_Member_Declaration
(Variant
@@ -686,10 +686,10 @@
inputs (<code>.tuple (<>.some (..generic_type^ type_vars)))
output (..generic_type^ type_vars)
exs (..throws_decl^ type_vars)]
- (in [[name #PublicP anns] {#method_tvars tvars
+ (in [[name #PublicP anns] [#method_tvars tvars
#method_inputs inputs
#method_output output
- #method_exs exs}]))))
+ #method_exs exs]]))))
(def: state_modifier^
(Parser State)
@@ -745,9 +745,9 @@
exs (..throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name constructor_method_name
+ (in [[#member_name constructor_method_name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#ConstructorMethod strict_fp? method_vars arg_decls constructor_args body exs)]))))
(def: (virtual_method_def^ class_vars)
@@ -766,9 +766,9 @@
exs (..throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#VirtualMethod final? strict_fp?
method_vars
this_name arg_decls return_type
@@ -789,9 +789,9 @@
exs (..throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy #PublicP
- #member_anns annotations}
+ #member_anns annotations]
(#OverridenMethod strict_fp?
owner_class method_vars
this_name arg_decls return_type
@@ -811,9 +811,9 @@
exs (..throws_decl^ total_vars)
annotations ..annotations^
body <code>.any]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#StaticMethod strict_fp? method_vars arg_decls return_type body exs)]))))
(def: abstract_method_def^
@@ -828,9 +828,9 @@
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
annotations ..annotations^]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#AbstractMethod method_vars arg_decls return_type exs)]))))
(def: native_method_def^
@@ -845,9 +845,9 @@
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
annotations ..annotations^]
- (in [{#member_name name
+ (in [[#member_name name
#member_privacy pm
- #member_anns annotations}
+ #member_anns annotations]
(#NativeMethod method_vars arg_decls return_type exs)]))))
(def: (method_def^ class_vars)
@@ -898,16 +898,15 @@
?prim_mode (<>.maybe primitive_mode^)
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^]
- (in (#ConstructorDecl [{#import_member_mode (maybe.else #AutoPrM ?prim_mode)
+ (in (#ConstructorDecl [[#import_member_mode (maybe.else #AutoPrM ?prim_mode)
#import_member_alias (maybe.else "new" ?alias)
#import_member_kind #VirtualIMK
#import_member_tvars tvars
#import_member_args args
#import_member_maybe? maybe?
#import_member_try? try?
- #import_member_io? io?}
- {}]))
- ))
+ #import_member_io? io?]
+ []]))))
(<code>.form (do <>.monad
[kind (: (Parser ImportMethodKind)
(<>.or (<code>.this! (' "static"))
@@ -920,17 +919,16 @@
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^
return (..generic_type^ total_vars)]
- (in (#MethodDecl [{#import_member_mode (maybe.else #AutoPrM ?prim_mode)
+ (in (#MethodDecl [[#import_member_mode (maybe.else #AutoPrM ?prim_mode)
#import_member_alias (maybe.else name ?alias)
#import_member_kind kind
#import_member_tvars tvars
#import_member_args args
#import_member_maybe? maybe?
#import_member_try? try?
- #import_member_io? io?}
- {#import_method_name name
- #import_method_return return
- }]))))
+ #import_member_io? io?]
+ [#import_method_name name
+ #import_method_return return]]))))
(<code>.form (do <>.monad
[static? (<>.parses? (<code>.this! (' "static")))
name <code>.local_identifier
@@ -938,12 +936,12 @@
gtype (..generic_type^ owner_vars)
maybe? (<>.parses? (<code>.this! (' "?")))
setter? (<>.parses? (<code>.this! (' #!)))]
- (in (#FieldAccessDecl {#import_field_mode (maybe.else #AutoPrM ?prim_mode)
+ (in (#FieldAccessDecl [#import_field_mode (maybe.else #AutoPrM ?prim_mode)
#import_field_name name
#import_field_static? static?
#import_field_maybe? maybe?
#import_field_setter? setter?
- #import_field_type gtype}))))
+ #import_field_type gtype]))))
))
(def: bundle
@@ -1177,8 +1175,8 @@
... [Syntax]
(def: object_super_class
Super_Class_Decl
- {#super_class_name "java/lang/Object"
- #super_class_params (list)})
+ [#super_class_name "java/lang/Object"
+ #super_class_params (list)])
(syntax: .public (class: [im inheritance_modifier^
class_decl ..class_decl^
diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux
index 7320bb059..2cc3fb56f 100644
--- a/stdlib/source/library/lux/ffi.php.lux
+++ b/stdlib/source/library/lux/ffi.php.lux
@@ -87,12 +87,12 @@
(type: Common_Method
(Record
- {#name Text
+ [#name Text
#alias (Maybe Alias)
#inputs (List Nullable)
#io? Bit
#try? Bit
- #output Nullable}))
+ #output Nullable]))
(type: Static_Method Common_Method)
(type: Virtual_Method Common_Method)
diff --git a/stdlib/source/library/lux/ffi.py.lux b/stdlib/source/library/lux/ffi.py.lux
index b49d7ddf4..3c47972ed 100644
--- a/stdlib/source/library/lux/ffi.py.lux
+++ b/stdlib/source/library/lux/ffi.py.lux
@@ -82,12 +82,12 @@
(type: Common_Method
(Record
- {#name Text
+ [#name Text
#alias (Maybe Text)
#inputs (List Noneable)
#io? Bit
#try? Bit
- #output Noneable}))
+ #output Noneable]))
(type: Static_Method Common_Method)
(type: Virtual_Method Common_Method)
diff --git a/stdlib/source/library/lux/ffi.rb.lux b/stdlib/source/library/lux/ffi.rb.lux
index e9a5869af..485fd904c 100644
--- a/stdlib/source/library/lux/ffi.rb.lux
+++ b/stdlib/source/library/lux/ffi.rb.lux
@@ -89,12 +89,12 @@
(type: Common_Method
(Record
- {#name Text
+ [#name Text
#alias (Maybe Alias)
#inputs (List Nilable)
#io? Bit
#try? Bit
- #output Nilable}))
+ #output Nilable]))
(type: Static_Method Common_Method)
(type: Virtual_Method Common_Method)
diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux
index fb270b39c..01717e47b 100644
--- a/stdlib/source/library/lux/ffi.scm.lux
+++ b/stdlib/source/library/lux/ffi.scm.lux
@@ -87,12 +87,12 @@
(type: Common_Method
(Record
- {#name Text
+ [#name Text
#alias (Maybe Alias)
#inputs (List Nilable)
#io? Bit
#try? Bit
- #output Nilable}))
+ #output Nilable]))
(def: common_method
(Parser Common_Method)
diff --git a/stdlib/source/library/lux/locale/language.lux b/stdlib/source/library/lux/locale/language.lux
index cb4314c59..117fc5a73 100644
--- a/stdlib/source/library/lux/locale/language.lux
+++ b/stdlib/source/library/lux/locale/language.lux
@@ -16,8 +16,8 @@
{}
(Record
- {#name Text
- #code Text})
+ [#name Text
+ #code Text])
(template [<name> <tag>]
[(def: .public <name>
@@ -33,8 +33,8 @@
(template [<code> <name> <definition> <alias>+]
[(def: .public <definition>
Language
- (:abstraction {#name <name>
- #code <code>}))
+ (:abstraction [#name <name>
+ #code <code>]))
(`` (template [<alias>]
[(def: .public <alias>
Language
diff --git a/stdlib/source/library/lux/locale/territory.lux b/stdlib/source/library/lux/locale/territory.lux
index 4b2dfd4b5..ae762a0fa 100644
--- a/stdlib/source/library/lux/locale/territory.lux
+++ b/stdlib/source/library/lux/locale/territory.lux
@@ -16,10 +16,10 @@
{}
(Record
- {#name Text
+ [#name Text
#short Text
#long Text
- #code Nat})
+ #code Nat])
(template [<name> <field> <type>]
[(def: .public <name>
@@ -36,10 +36,10 @@
(template [<short> <long> <number> <name> <main> <neighbor>+]
[(def: .public <main>
Territory
- (:abstraction {#name <name>
+ (:abstraction [#name <name>
#short <short>
#long <long>
- #code <number>}))
+ #code <number>]))
(`` (template [<neighbor>]
[(def: .public <neighbor> Territory <main>)]
diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux
index 18b0049ee..d6eb8215e 100644
--- a/stdlib/source/library/lux/macro/syntax/check.lux
+++ b/stdlib/source/library/lux/macro/syntax/check.lux
@@ -19,8 +19,8 @@
(type: .public Check
(Record
- {#type Code
- #value Code}))
+ [#type Code
+ #value Code]))
(def: .public equivalence
(Equivalence Check)
diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux
index ae6ae3ee7..8713b35fc 100644
--- a/stdlib/source/library/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/library/lux/macro/syntax/declaration.lux
@@ -16,8 +16,8 @@
(type: .public Declaration
(Record
- {#name Text
- #arguments (List Text)}))
+ [#name Text
+ #arguments (List Text)]))
(def: .public equivalence
(Equivalence Declaration)
diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux
index ee7238603..7b87eeba7 100644
--- a/stdlib/source/library/lux/macro/syntax/definition.lux
+++ b/stdlib/source/library/lux/macro/syntax/definition.lux
@@ -27,11 +27,11 @@
(type: .public Definition
(Record
- {#name Text
+ [#name Text
#value (Either Check
Code)
#anns Annotations
- #export? Bit}))
+ #export? Bit]))
(def: .public equivalence
(Equivalence Definition)
@@ -66,9 +66,9 @@
(def: dummy
Code
- (` {#.module (~ (code.text (value@ #.module location.dummy)))
+ (` [#.module (~ (code.text (value@ #.module location.dummy)))
#.line (~ (code.nat (value@ #.line location.dummy)))
- #.column (~ (code.nat (value@ #.column location.dummy)))}))
+ #.column (~ (code.nat (value@ #.column location.dummy)))]))
(def: .public (format (^slots [#name #value #anns #export?]))
(-> Definition Code)
diff --git a/stdlib/source/library/lux/macro/syntax/input.lux b/stdlib/source/library/lux/macro/syntax/input.lux
index 47bf4d6ac..c0f7066c6 100644
--- a/stdlib/source/library/lux/macro/syntax/input.lux
+++ b/stdlib/source/library/lux/macro/syntax/input.lux
@@ -13,8 +13,8 @@
(type: .public Input
(Record
- {#binding Code
- #type Code}))
+ [#binding Code
+ #type Code]))
(def: .public equivalence
(Equivalence Input)
diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux
index 3c18f9f9e..256302d3c 100644
--- a/stdlib/source/library/lux/macro/template.lux
+++ b/stdlib/source/library/lux/macro/template.lux
@@ -129,9 +129,9 @@
(type: Local
(Record
- {#name Text
+ [#name Text
#parameters (List Text)
- #template (List Code)}))
+ #template (List Code)]))
(exception: .public (irregular_arguments {expected Nat} {actual Nat})
(exception.report
@@ -157,9 +157,9 @@
[[name parameters] (<code>.form (<>.and <code>.local_identifier
(<>.many <code>.local_identifier)))
template (<code>.tuple (<>.some <code>.any))]
- (in {#name name
+ (in [#name name
#parameters parameters
- #template template})))
+ #template template])))
(syntax: .public (let [locals (<code>.tuple (<>.some ..local))
body <code>.any])
diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux
index 5b462ccfd..35f92dc13 100644
--- a/stdlib/source/library/lux/math/modular.lux
+++ b/stdlib/source/library/lux/math/modular.lux
@@ -31,13 +31,13 @@
{}
(Record
- {#modulus (Modulus m)
- #value Int})
+ [#modulus (Modulus m)
+ #value Int])
(def: .public (modular modulus value)
(All (_ %) (-> (Modulus %) Int (Mod %)))
- (:abstraction {#modulus modulus
- #value (i.mod (//.divisor modulus) value)}))
+ (:abstraction [#modulus modulus
+ #value (i.mod (//.divisor modulus) value)]))
(template [<name> <type> <side>]
[(def: .public <name>
@@ -110,10 +110,10 @@
(All (_ %) (-> (Mod %) (Mod %) (Mod %)))
(let [[modulus param] (:representation param)
[_ subject] (:representation subject)]
- (:abstraction {#modulus modulus
+ (:abstraction [#modulus modulus
#value (|> subject
(<op> param)
- (i.mod (//.divisor modulus)))})))]
+ (i.mod (//.divisor modulus)))])))]
[+ i.+]
[- i.-]
diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux
index 6687bd043..8d040123a 100644
--- a/stdlib/source/library/lux/math/number/complex.lux
+++ b/stdlib/source/library/lux/math/number/complex.lux
@@ -24,13 +24,13 @@
(type: .public Complex
(Record
- {#real Frac
- #imaginary Frac}))
+ [#real Frac
+ #imaginary Frac]))
(syntax: .public (complex [real <code>.any
?imaginary (<>.maybe <code>.any)])
- (in (list (` {#..real (~ real)
- #..imaginary (~ (maybe.else (' +0.0) ?imaginary))}))))
+ (in (list (` [#..real (~ real)
+ #..imaginary (~ (maybe.else (' +0.0) ?imaginary))]))))
(def: .public i
(..complex +0.0 +1.0))
@@ -59,10 +59,10 @@
(template [<name> <op>]
[(def: .public (<name> param input)
(-> Complex Complex Complex)
- {#real (<op> (value@ #real param)
+ [#real (<op> (value@ #real param)
(value@ #real input))
#imaginary (<op> (value@ #imaginary param)
- (value@ #imaginary input))})]
+ (value@ #imaginary input))])]
[+ f.+]
[- f.-]
@@ -89,21 +89,21 @@
(def: .public (*' param input)
(-> Frac Complex Complex)
- {#real (f.* param
+ [#real (f.* param
(value@ #real input))
#imaginary (f.* param
- (value@ #imaginary input))})
+ (value@ #imaginary input))])
(def: .public (* param input)
(-> Complex Complex Complex)
- {#real (f.- (f.* (value@ #imaginary param)
+ [#real (f.- (f.* (value@ #imaginary param)
(value@ #imaginary input))
(f.* (value@ #real param)
(value@ #real input)))
#imaginary (f.+ (f.* (value@ #real param)
(value@ #imaginary input))
(f.* (value@ #imaginary param)
- (value@ #real input)))})
+ (value@ #real input)))])
(def: .public (/ param input)
(-> Complex Complex Complex)
@@ -112,18 +112,18 @@
(f.abs real))
(let [quot (f./ imaginary real)
denom (|> real (f.* quot) (f.+ imaginary))]
- {#real (|> (value@ #real input) (f.* quot) (f.+ (value@ #imaginary input)) (f./ denom))
- #imaginary (|> (value@ #imaginary input) (f.* quot) (f.- (value@ #real input)) (f./ denom))})
+ [#real (|> (value@ #real input) (f.* quot) (f.+ (value@ #imaginary input)) (f./ denom))
+ #imaginary (|> (value@ #imaginary input) (f.* quot) (f.- (value@ #real input)) (f./ denom))])
(let [quot (f./ real imaginary)
denom (|> imaginary (f.* quot) (f.+ real))]
- {#real (|> (value@ #imaginary input) (f.* quot) (f.+ (value@ #real input)) (f./ denom))
- #imaginary (|> (value@ #imaginary input) (f.- (f.* quot (value@ #real input))) (f./ denom))}))))
+ [#real (|> (value@ #imaginary input) (f.* quot) (f.+ (value@ #real input)) (f./ denom))
+ #imaginary (|> (value@ #imaginary input) (f.- (f.* quot (value@ #real input))) (f./ denom))]))))
(def: .public (/' param subject)
(-> Frac Complex Complex)
(let [(^slots [#real #imaginary]) subject]
- {#real (f./ param real)
- #imaginary (f./ param imaginary)}))
+ [#real (f./ param real)
+ #imaginary (f./ param imaginary)]))
(def: .public (% param input)
(-> Complex Complex Complex)
@@ -137,34 +137,34 @@
(def: .public (cos subject)
(-> Complex Complex)
(let [(^slots [#real #imaginary]) subject]
- {#real (f.* (math.cosh imaginary)
+ [#real (f.* (math.cosh imaginary)
(math.cos real))
#imaginary (f.opposite (f.* (math.sinh imaginary)
- (math.sin real)))}))
+ (math.sin real)))]))
(def: .public (cosh subject)
(-> Complex Complex)
(let [(^slots [#real #imaginary]) subject]
- {#real (f.* (math.cos imaginary)
+ [#real (f.* (math.cos imaginary)
(math.cosh real))
#imaginary (f.* (math.sin imaginary)
- (math.sinh real))}))
+ (math.sinh real))]))
(def: .public (sin subject)
(-> Complex Complex)
(let [(^slots [#real #imaginary]) subject]
- {#real (f.* (math.cosh imaginary)
+ [#real (f.* (math.cosh imaginary)
(math.sin real))
#imaginary (f.* (math.sinh imaginary)
- (math.cos real))}))
+ (math.cos real))]))
(def: .public (sinh subject)
(-> Complex Complex)
(let [(^slots [#real #imaginary]) subject]
- {#real (f.* (math.cos imaginary)
+ [#real (f.* (math.cos imaginary)
(math.sinh real))
#imaginary (f.* (math.sin imaginary)
- (math.cosh real))}))
+ (math.cosh real))]))
(def: .public (tan subject)
(-> Complex Complex)
@@ -172,8 +172,8 @@
r2 (f.* +2.0 real)
i2 (f.* +2.0 imaginary)
d (f.+ (math.cos r2) (math.cosh i2))]
- {#real (f./ d (math.sin r2))
- #imaginary (f./ d (math.sinh i2))}))
+ [#real (f./ d (math.sin r2))
+ #imaginary (f./ d (math.sinh i2))]))
(def: .public (tanh subject)
(-> Complex Complex)
@@ -181,8 +181,8 @@
r2 (f.* +2.0 real)
i2 (f.* +2.0 imaginary)
d (f.+ (math.cosh r2) (math.cos i2))]
- {#real (f./ d (math.sinh r2))
- #imaginary (f./ d (math.sin i2))}))
+ [#real (f./ d (math.sinh r2))
+ #imaginary (f./ d (math.sin i2))]))
(def: .public (abs subject)
(-> Complex Frac)
@@ -204,14 +204,14 @@
(-> Complex Complex)
(let [(^slots [#real #imaginary]) subject
r_exp (math.exp real)]
- {#real (f.* r_exp (math.cos imaginary))
- #imaginary (f.* r_exp (math.sin imaginary))}))
+ [#real (f.* r_exp (math.cos imaginary))
+ #imaginary (f.* r_exp (math.sin imaginary))]))
(def: .public (log subject)
(-> Complex Complex)
(let [(^slots [#real #imaginary]) subject]
- {#real (|> subject ..abs math.log)
- #imaginary (math.atan/2 real imaginary)}))
+ [#real (|> subject ..abs math.log)
+ #imaginary (math.atan/2 real imaginary)]))
(template [<name> <type> <op>]
[(def: .public (<name> param input)
@@ -231,12 +231,12 @@
(let [(^slots [#real #imaginary]) input
t (|> input ..abs (f.+ (f.abs real)) (f./ +2.0) (math.pow +0.5))]
(if (f.< +0.0 real)
- {#real (f./ (f.* +2.0 t)
+ [#real (f./ (f.* +2.0 t)
(f.abs imaginary))
- #imaginary (f.* t (..with_sign imaginary +1.0))}
- {#real t
+ #imaginary (f.* t (..with_sign imaginary +1.0))]
+ [#real t
#imaginary (f./ (f.* +2.0 t)
- imaginary)})))
+ imaginary)])))
(def: (root/2-1z input)
(-> Complex Complex)
@@ -249,13 +249,13 @@
(let [q (f./ imaginary real)
scale (f./ (|> real (f.* q) (f.+ imaginary))
+1.0)]
- {#real (f.* q scale)
- #imaginary (f.opposite scale)})
+ [#real (f.* q scale)
+ #imaginary (f.opposite scale)])
(let [q (f./ real imaginary)
scale (f./ (|> imaginary (f.* q) (f.+ real))
+1.0)]
- {#real scale
- #imaginary (|> scale f.opposite (f.* q))})))
+ [#real scale
+ #imaginary (|> scale f.opposite (f.* q))])))
(def: .public (acos input)
(-> Complex Complex)
@@ -301,8 +301,8 @@
(math.cos inner))
imaginary (f.* nth_root_of_abs
(math.sin inner))]
- {#real real
- #imaginary imaginary})))))))
+ [#real real
+ #imaginary imaginary])))))))
(def: .public (approximately? margin_of_error standard value)
(-> Frac Complex Complex Bit)
diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux
index 4f510366c..5880650e3 100644
--- a/stdlib/source/library/lux/math/number/frac.lux
+++ b/stdlib/source/library/lux/math/number/frac.lux
@@ -200,7 +200,7 @@
("lux text concat" "+" ("lux f64 encode" x)))))
(def: (decoded input)
- (case ("lux f64 decode" [input])
+ (case ("lux f64 decode" input)
(#.Some value)
(#try.Success value)
diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux
index 6be8bce44..52f826ae8 100644
--- a/stdlib/source/library/lux/math/number/ratio.lux
+++ b/stdlib/source/library/lux/math/number/ratio.lux
@@ -24,8 +24,8 @@
(type: .public Ratio
(Record
- {#numerator Nat
- #denominator Nat}))
+ [#numerator Nat
+ #denominator Nat]))
(def: .public (nat value)
(-> Ratio (Maybe Nat))
@@ -36,13 +36,13 @@
(def: (normal (^slots [#numerator #denominator]))
(-> Ratio Ratio)
(let [common (n.gcd numerator denominator)]
- {#numerator (n./ common numerator)
- #denominator (n./ common denominator)}))
+ [#numerator (n./ common numerator)
+ #denominator (n./ common denominator)]))
(syntax: .public (ratio [numerator <code>.any
?denominator (<>.maybe <code>.any)])
- (in (list (` ((~! ..normal) {#..numerator (~ numerator)
- #..denominator (~ (maybe.else (' 1) ?denominator))})))))
+ (in (list (` ((~! ..normal) [#..numerator (~ numerator)
+ #..denominator (~ (maybe.else (' 1) ?denominator))])))))
(def: .public (= parameter subject)
(-> Ratio Ratio Bit)
@@ -123,8 +123,8 @@
(def: .public (reciprocal (^slots [#numerator #denominator]))
(-> Ratio Ratio)
- {#numerator denominator
- #denominator numerator})
+ [#numerator denominator
+ #denominator numerator])
(def: separator ":")
@@ -140,8 +140,8 @@
(do try.monad
[numerator (n\decoded num)
denominator (n\decoded denom)]
- (in (normal {#numerator numerator
- #denominator denominator})))
+ (in (normal [#numerator numerator
+ #denominator denominator])))
#.None
(#.Left (text\composite "Invalid syntax for ratio: " input)))))
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux
index 3cc8deedf..87ffc64be 100644
--- a/stdlib/source/library/lux/meta.lux
+++ b/stdlib/source/library/lux/meta.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux (#- type macro)
+ [lux (#- type macro try)
[abstract
[functor (#+ Functor)]
[apply (#+ Apply)]
@@ -548,24 +548,27 @@
(|>> (value@ #.imports) (list.any? (text\= import)))
..current_module))
-(def: .public (tag tag_name)
- (-> Name (Meta [Nat (List Name) Type]))
- (do ..monad
- [.let [[module name] tag_name]
- =module (..module module)
- this_module_name ..current_module_name
- imported! (..imported? module)]
- (case (plist.value (text\composite "#" name) (value@ #.definitions =module))
- (^or (#.Some (#.Label [exported? type group idx]))
- (#.Some (#.Slot [exported? type group idx])))
- (if (or (text\= this_module_name module)
- (and imported! exported?))
- (in [idx (list\each (|>> [module]) group) type])
- (..failure ($_ text\composite "Cannot access tag: " (name\encoded tag_name) " from module " this_module_name)))
-
- _
- (..failure ($_ text\composite
- "Unknown tag: " (name\encoded tag_name))))))
+(template [<name> <tag> <description>]
+ [(def: .public (<name> tag_name)
+ (-> Name (Meta [Nat (List Name) Type]))
+ (do ..monad
+ [.let [[module name] tag_name]
+ =module (..module module)
+ this_module_name ..current_module_name]
+ (case (plist.value (text\composite "#" name) (value@ #.definitions =module))
+ (#.Some (<tag> [exported? type group idx]))
+ (if (or (text\= this_module_name module)
+ exported?)
+ (in [idx (list\each (|>> [module]) group) type])
+ (..failure ($_ text\composite "Cannot access " <description> ": " (name\encoded tag_name) " from module " this_module_name)))
+
+ _
+ (..failure ($_ text\composite
+ "Unknown " <description> ": " (name\encoded tag_name))))))]
+
+ [tag #.Label "tag"]
+ [slot #.Slot "slot"]
+ )
(def: .public (tag_lists module)
(-> Text (Meta (List [(List Name) Type])))
@@ -650,3 +653,13 @@
[eval (\ ! each (value@ #.eval)
..compiler_state)]
(eval type code)))
+
+(def: .public (try computation)
+ (All (_ it) (-> (Meta it) (Meta (Try it))))
+ (function (_ lux)
+ (case (computation lux)
+ (#try.Success [lux' output])
+ (#try.Success [lux' (#try.Success output)])
+
+ (#try.Failure error)
+ (#try.Success [lux (#try.Failure error)]))))
diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux
index f8d3a9023..7282e9c1b 100644
--- a/stdlib/source/library/lux/meta/location.lux
+++ b/stdlib/source/library/lux/meta/location.lux
@@ -14,9 +14,9 @@
(def: .public dummy
Location
- {#.module ""
+ [#.module ""
#.line 0
- #.column 0})
+ #.column 0])
(macro: .public (here tokens compiler)
(case tokens
diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux
index 5a5b10a06..9714e7743 100644
--- a/stdlib/source/library/lux/target/common_lisp.lux
+++ b/stdlib/source/library/lux/target/common_lisp.lux
@@ -61,8 +61,8 @@
(type: .public Lambda
(Record
- {#input Var/*
- #output (Expression Any)}))
+ [#input Var/*
+ #output (Expression Any)]))
(def: .public nil
Literal
@@ -387,9 +387,9 @@
(type: .public Handler
(Record
- {#condition_type (Expression Any)
+ [#condition_type (Expression Any)
#condition Var/1
- #body (Expression Any)}))
+ #body (Expression Any)]))
(def: .public (handler_case handlers body)
(-> (List Handler) (Expression Any) (Computation Any))
diff --git a/stdlib/source/library/lux/target/jvm/attribute.lux b/stdlib/source/library/lux/target/jvm/attribute.lux
index 4d79cfb86..45758f54f 100644
--- a/stdlib/source/library/lux/target/jvm/attribute.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute.lux
@@ -27,9 +27,9 @@
(type: .public (Info about)
(Record
- {#name (Index UTF8)
+ [#name (Index UTF8)
#length U4
- #info about}))
+ #info about]))
(def: .public (info_equivalence Equivalence<about>)
(All (_ about)
@@ -89,9 +89,9 @@
... TODO: Inline ASAP
(def: (constant' @name index)
(-> (Index UTF8) (Constant Any) Attribute)
- (#Constant {#name @name
+ (#Constant [#name @name
#length (|> /constant.length //unsigned.u4 try.trusted)
- #info index}))
+ #info index]))
(def: .public (constant index)
(-> (Constant Any) (Resource Attribute))
@@ -102,13 +102,13 @@
... TODO: Inline ASAP
(def: (code' @name specification)
(-> (Index UTF8) Code Attribute)
- (#Code {#name @name
+ (#Code [#name @name
... https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3
#length (|> specification
(/code.length ..length)
//unsigned.u4
try.trusted)
- #info specification}))
+ #info specification]))
(def: .public (code specification)
(-> Code (Resource Attribute))
diff --git a/stdlib/source/library/lux/target/jvm/attribute/code.lux b/stdlib/source/library/lux/target/jvm/attribute/code.lux
index a36208054..207ddf022 100644
--- a/stdlib/source/library/lux/target/jvm/attribute/code.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute/code.lux
@@ -24,10 +24,10 @@
(type: .public (Code Attribute)
(Record
- {#limit Limit
+ [#limit Limit
#code Binary
#exception_table (Row Exception)
- #attributes (Row Attribute)}))
+ #attributes (Row Attribute)]))
(def: .public (length length code)
(All (_ Attribute) (-> (-> Attribute Nat) (Code Attribute) Nat))
diff --git a/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux b/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux
index a2a4f45c1..6bdf8dfff 100644
--- a/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux
@@ -21,10 +21,10 @@
(type: .public Exception
(Record
- {#start Address
+ [#start Address
#end Address
#handler Address
- #catch (Index Class)}))
+ #catch (Index Class)]))
(def: .public equivalence
(Equivalence Exception)
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index e3c1fc9db..0cb111e13 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -59,15 +59,15 @@
(type: .public Tracker
(Record
- {#program_counter Address
+ [#program_counter Address
#next Label
- #known Resolver}))
+ #known Resolver]))
(def: fresh
Tracker
- {#program_counter /address.start
+ [#program_counter /address.start
#next 0
- #known (dictionary.empty n.hash)})
+ #known (dictionary.empty n.hash)])
(type: .public Relative
(-> Resolver (Try [(Row Exception) Instruction])))
@@ -976,8 +976,8 @@
(do ..monad
[index (<| ..lifted
(<method> (..reflection class))
- {#//constant/pool.name method
- #//constant/pool.descriptor (type.descriptor type)})
+ [#//constant/pool.name method
+ #//constant/pool.descriptor (type.descriptor type)])
.let [consumption (|> inputs
(list\each ..type_size)
(list\mix n.+ (if <static?> 0 1))
@@ -1001,8 +1001,8 @@
(do ..monad
[index (<| ..lifted
(//constant/pool.field (..reflection class))
- {#//constant/pool.name field
- #//constant/pool.descriptor (type.descriptor type)})]
+ [#//constant/pool.name field
+ #//constant/pool.descriptor (type.descriptor type)])]
(if (or (same? type.long type)
(same? type.double type))
(..bytecode <consumption> $2 @_ <2> [index])
@@ -1036,10 +1036,10 @@
(in [])
(exception.except ..invalid_range_for_try [@start @end]))
[_ @handler] (..resolve_label @handler resolver)]
- (in [(row.row {#//exception.start @start
+ (in [(row.row [#//exception.start @start
#//exception.end @end
#//exception.handler @handler
- #//exception.catch @catch})
+ #//exception.catch @catch])
_.empty])))
[]]]))))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
index ff778621c..2bf2c5c31 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
@@ -19,16 +19,16 @@
(type: .public Environment
(Record
- {#limit Limit
- #stack (Maybe Stack)}))
+ [#limit Limit
+ #stack (Maybe Stack)]))
(template [<name> <limit>]
[(def: .public (<name> type)
(-> (Type Method) (Try Environment))
(do try.monad
[limit (<limit> type)]
- (in {#limit limit
- #stack (#.Some /stack.empty)})))]
+ (in [#limit limit
+ #stack (#.Some /stack.empty)])))]
[static /limit.static]
[virtual /limit.virtual]
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
index 515728d71..4ab466ae4 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
@@ -22,16 +22,16 @@
(type: .public Limit
(Record
- {#stack Stack
- #registry Registry}))
+ [#stack Stack
+ #registry Registry]))
(template [<name> <registry>]
[(def: .public (<name> type)
(-> (Type Method) (Try Limit))
(do try.monad
[registry (<registry> type)]
- (in {#stack /stack.empty
- #registry registry})))]
+ (in [#stack /stack.empty
+ #registry registry])))]
[static /registry.static]
[virtual /registry.virtual]
diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux
index 03853a4ee..1dae89e90 100644
--- a/stdlib/source/library/lux/target/jvm/class.lux
+++ b/stdlib/source/library/lux/target/jvm/class.lux
@@ -30,7 +30,7 @@
(type: .public Class
(Rec Class
(Record
- {#magic Magic
+ [#magic Magic
#minor_version Minor
#major_version Major
#constant_pool Pool
@@ -40,7 +40,7 @@
#interfaces (Row (Index //constant.Class))
#fields (Row Field)
#methods (Row Method)
- #attributes (Row Attribute)})))
+ #attributes (Row Attribute)])))
(modifiers: Class
["0001" public]
@@ -100,7 +100,7 @@
=fields (monad.all //constant/pool.monad fields)
=methods (monad.all //constant/pool.monad methods)]
(in [classes =fields =methods])))]
- (in {#magic //magic.code
+ (in [#magic //magic.code
#minor_version //version.default_minor
#major_version version
#constant_pool pool
@@ -110,7 +110,7 @@
#interfaces @interfaces
#fields (row.of_list =fields)
#methods (row.of_list =methods)
- #attributes attributes})))
+ #attributes attributes])))
(def: .public (writer class)
(Writer Class)
diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux
index 63eff794c..780816d70 100644
--- a/stdlib/source/library/lux/target/jvm/constant.lux
+++ b/stdlib/source/library/lux/target/jvm/constant.lux
@@ -134,13 +134,13 @@
(type: .public (Name_And_Type of)
(Record
- {#name (Index UTF8)
- #descriptor (Index (Descriptor of))}))
+ [#name (Index UTF8)
+ #descriptor (Index (Descriptor of))]))
(type: .public (Reference of)
(Record
- {#class (Index Class)
- #name_and_type (Index (Name_And_Type of))}))
+ [#class (Index Class)
+ #name_and_type (Index (Name_And_Type of))]))
(template [<type> <equivalence> <writer>]
[(def: .public <equivalence>
diff --git a/stdlib/source/library/lux/target/jvm/constant/pool.lux b/stdlib/source/library/lux/target/jvm/constant/pool.lux
index d71b3727e..a680980ef 100644
--- a/stdlib/source/library/lux/target/jvm/constant/pool.lux
+++ b/stdlib/source/library/lux/target/jvm/constant/pool.lux
@@ -122,8 +122,8 @@
(type: .public (Member of)
(Record
- {#name UTF8
- #descriptor (Descriptor of)}))
+ [#name UTF8
+ #descriptor (Descriptor of)]))
(def: .public (name_and_type [name descriptor])
(All (_ of)
@@ -131,7 +131,7 @@
(do ..monad
[@name (utf8 name)
@descriptor (..descriptor descriptor)]
- (!add #//.Name_And_Type //.name_and_type_equivalence {#//.name @name #//.descriptor @descriptor})))
+ (!add #//.Name_And_Type //.name_and_type_equivalence [#//.name @name #//.descriptor @descriptor])))
(template [<name> <tag> <of>]
[(def: .public (<name> class member)
@@ -139,7 +139,7 @@
(do ..monad
[@class (..class (//name.internal class))
@name_and_type (name_and_type member)]
- (!add <tag> //.reference_equivalence {#//.class @class #//.name_and_type @name_and_type})))]
+ (!add <tag> //.reference_equivalence [#//.class @class #//.name_and_type @name_and_type])))]
[field #//.Field Value]
[method #//.Method Method]
diff --git a/stdlib/source/library/lux/target/jvm/field.lux b/stdlib/source/library/lux/target/jvm/field.lux
index 5514a2674..a709da105 100644
--- a/stdlib/source/library/lux/target/jvm/field.lux
+++ b/stdlib/source/library/lux/target/jvm/field.lux
@@ -23,10 +23,10 @@
(type: .public Field
(Rec Field
(Record
- {#modifier (Modifier Field)
+ [#modifier (Modifier Field)
#name (Index UTF8)
#descriptor (Index (Descriptor Value))
- #attributes (Row Attribute)})))
+ #attributes (Row Attribute)])))
(modifiers: Field
["0001" public]
@@ -66,7 +66,7 @@
(do //constant/pool.monad
[@name (//constant/pool.utf8 name)
@descriptor (//constant/pool.descriptor (//type.descriptor type))]
- (in {#modifier modifier
+ (in [#modifier modifier
#name @name
#descriptor @descriptor
- #attributes attributes})))
+ #attributes attributes])))
diff --git a/stdlib/source/library/lux/target/jvm/method.lux b/stdlib/source/library/lux/target/jvm/method.lux
index 09a7d56f1..638d4091f 100644
--- a/stdlib/source/library/lux/target/jvm/method.lux
+++ b/stdlib/source/library/lux/target/jvm/method.lux
@@ -29,10 +29,10 @@
(type: .public Method
(Rec Method
(Record
- {#modifier (Modifier Method)
+ [#modifier (Modifier Method)
#name (Index UTF8)
#descriptor (Index (Descriptor //type/category.Method))
- #attributes (Row Attribute)})))
+ #attributes (Row Attribute)])))
(modifiers: Method
["0001" public]
@@ -71,18 +71,18 @@
(function (_ _) (#try.Failure error)))
[environment exceptions instruction output] (//bytecode.resolve environment code)
.let [bytecode (|> instruction //bytecode/instruction.result format.instance)]
- @code (//attribute.code {#//attribute/code.limit (value@ #//bytecode/environment.limit environment)
+ @code (//attribute.code [#//attribute/code.limit (value@ #//bytecode/environment.limit environment)
#//attribute/code.code bytecode
#//attribute/code.exception_table exceptions
- #//attribute/code.attributes (row.row)})]
+ #//attribute/code.attributes (row.row)])]
(in (row.suffix @code attributes)))
#.None
(in attributes))]
- (in {#modifier modifier
+ (in [#modifier modifier
#name @name
#descriptor @descriptor
- #attributes attributes})))
+ #attributes attributes])))
(def: .public equivalence
(Equivalence Method)
diff --git a/stdlib/source/library/lux/target/jvm/type.lux b/stdlib/source/library/lux/target/jvm/type.lux
index 0b89649c3..55c6bd921 100644
--- a/stdlib/source/library/lux/target/jvm/type.lux
+++ b/stdlib/source/library/lux/target/jvm/type.lux
@@ -38,9 +38,9 @@
(type: .public Constraint
(Record
- {#name Text
+ [#name Text
#super_class (Type Class)
- #super_interfaces (List (Type Class))}))
+ #super_interfaces (List (Type Class))]))
(template [<name> <style>]
[(def: .public (<name> type)
diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux
index a14b3e0ce..57fca8e65 100644
--- a/stdlib/source/library/lux/target/php.lux
+++ b/stdlib/source/library/lux/target/php.lux
@@ -94,8 +94,8 @@
(type: .public Argument
(Record
- {#reference? Bit
- #var Var}))
+ [#reference? Bit
+ #var Var]))
(def: .public ;
(-> Expression Statement)
@@ -477,9 +477,9 @@
(type: .public Except
(Record
- {#class Constant
+ [#class Constant
#exception Var
- #handler Statement}))
+ #handler Statement]))
(def: (catch except)
(-> Except Text)
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux
index 6b24b6ae2..f0d4e23f2 100644
--- a/stdlib/source/library/lux/target/python.lux
+++ b/stdlib/source/library/lux/target/python.lux
@@ -396,9 +396,9 @@
(type: .public Except
(Record
- {#classes (List SVar)
+ [#classes (List SVar)
#exception SVar
- #handler (Statement Any)}))
+ #handler (Statement Any)]))
(def: .public (try body! excepts)
(-> (Statement Any) (List Except) (Statement Any))
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index fb1eaed26..501c4d1e7 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -308,9 +308,9 @@
(type: .public Rescue
(Record
- {#classes (List Text)
+ [#classes (List Text)
#exception LVar
- #rescue Statement}))
+ #rescue Statement]))
(def: .public (begin body! rescues)
(-> Statement (List Rescue) Statement)
diff --git a/stdlib/source/library/lux/target/scheme.lux b/stdlib/source/library/lux/target/scheme.lux
index 97aabfb76..5bce310fc 100644
--- a/stdlib/source/library/lux/target/scheme.lux
+++ b/stdlib/source/library/lux/target/scheme.lux
@@ -60,8 +60,8 @@
(type: .public Arguments
(Record
- {#mandatory (List Var)
- #rest (Maybe Var)}))
+ [#mandatory (List Var)
+ #rest (Maybe Var)]))
(def: .public manual
(-> Text Code)
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index b5275fa01..feab6c2f6 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -42,26 +42,26 @@
(type: .public Tally
(Record
- {#successes Nat
+ [#successes Nat
#failures Nat
#expected_coverage (Set Name)
- #actual_coverage (Set Name)}))
+ #actual_coverage (Set Name)]))
(def: (total parameter subject)
(-> Tally Tally Tally)
- {#successes (n.+ (value@ #successes parameter) (value@ #successes subject))
+ [#successes (n.+ (value@ #successes parameter) (value@ #successes subject))
#failures (n.+ (value@ #failures parameter) (value@ #failures subject))
#expected_coverage (set.union (value@ #expected_coverage parameter)
(value@ #expected_coverage subject))
#actual_coverage (set.union (value@ #actual_coverage parameter)
- (value@ #actual_coverage subject))})
+ (value@ #actual_coverage subject))])
(def: start
Tally
- {#successes 0
+ [#successes 0
#failures 0
#expected_coverage (set.empty name.hash)
- #actual_coverage (set.empty name.hash)})
+ #actual_coverage (set.empty name.hash)])
(template [<name> <category>]
[(def: <name>
diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux
index 9b7ce7118..87556b1a8 100644
--- a/stdlib/source/library/lux/time.lux
+++ b/stdlib/source/library/lux/time.lux
@@ -169,10 +169,10 @@
(type: .public Clock
(Record
- {#hour Nat
+ [#hour Nat
#minute Nat
#second Nat
- #milli_second Nat}))
+ #milli_second Nat]))
(def: .public (clock time)
(-> Time Clock)
@@ -180,13 +180,13 @@
[hours time] [(duration.ticks duration.hour time) (duration.framed duration.hour time)]
[minutes time] [(duration.ticks duration.minute time) (duration.framed duration.minute time)]
[seconds millis] [(duration.ticks duration.second time) (duration.framed duration.second time)]]
- {#hour (.nat hours)
+ [#hour (.nat hours)
#minute (.nat minutes)
#second (.nat seconds)
#milli_second (|> millis
(..positive duration.second)
duration.millis
- .nat)}))
+ .nat)]))
(def: .public (time clock)
(-> Clock (Try Time))
diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux
index 559638614..d606449c5 100644
--- a/stdlib/source/library/lux/time/date.lux
+++ b/stdlib/source/library/lux/time/date.lux
@@ -71,9 +71,9 @@
{}
(Record
- {#year Year
+ [#year Year
#month Month
- #day Nat})
+ #day Nat])
(def: .public (date year month day_of_month)
(-> Year Month Nat (Try Date))
@@ -81,9 +81,9 @@
(exception.except ..invalid_day [year month day_of_month])
(#try.Success
(:abstraction
- {#year year
+ [#year year
#month month
- #day day_of_month}))))
+ #day day_of_month]))))
(def: .public epoch
Date
diff --git a/stdlib/source/library/lux/tool/compiler.lux b/stdlib/source/library/lux/tool/compiler.lux
index b1408854c..5bb3c0fd2 100644
--- a/stdlib/source/library/lux/tool/compiler.lux
+++ b/stdlib/source/library/lux/tool/compiler.lux
@@ -26,17 +26,17 @@
(type: .public Input
(Record
- {#module Module
+ [#module Module
#file Path
#hash Nat
- #code Code}))
+ #code Code]))
(type: .public (Compilation s d o)
(Record
- {#dependencies (List Module)
+ [#dependencies (List Module)
#process (-> s Archive
(Try [s (Either (Compilation s d o)
- [Descriptor (Document d) Output])]))}))
+ [Descriptor (Document d) Output])]))]))
(type: .public (Compiler s d o)
(-> Input (Compilation s d o)))
diff --git a/stdlib/source/library/lux/tool/compiler/default/init.lux b/stdlib/source/library/lux/tool/compiler/default/init.lux
index 2bbbb5ede..7748186b2 100644
--- a/stdlib/source/library/lux/tool/compiler/default/init.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/init.lux
@@ -67,12 +67,12 @@
analysis_state [(analysisE.bundle eval host_analysis)
(///analysis.state (///analysis.info ///version.version target))]]
[extension.empty
- {#///directive.analysis {#///directive.state analysis_state
- #///directive.phase (analysisP.phase expander)}
- #///directive.synthesis {#///directive.state synthesis_state
- #///directive.phase synthesisP.phase}
- #///directive.generation {#///directive.state generation_state
- #///directive.phase generate}}]))
+ [#///directive.analysis [#///directive.state analysis_state
+ #///directive.phase (analysisP.phase expander)]
+ #///directive.synthesis [#///directive.state synthesis_state
+ #///directive.phase synthesisP.phase]
+ #///directive.generation [#///directive.state generation_state
+ #///directive.phase generate]]]))
(def: .public (with_default_directives expander host_analysis program anchorT,expressionT,directiveT extender)
(All (_ anchor expression directive)
@@ -235,7 +235,7 @@
(let [execute! (directiveP.phase wrapper expander)]
(function (_ key parameters input)
(let [dependencies (default_dependencies prelude input)]
- {#///.dependencies dependencies
+ [#///.dependencies dependencies
#///.process (function (_ state archive)
(do {! try.monad}
[.let [hash (text\hash (value@ #///.code input))]
@@ -250,12 +250,12 @@
#.None
(do !
[[state [analysis_module [final_buffer final_registry]]] (///phase.result' state (..end module))
- .let [descriptor {#descriptor.hash hash
+ .let [descriptor [#descriptor.hash hash
#descriptor.name module
#descriptor.file (value@ #///.file input)
#descriptor.references (set.of_list text.hash dependencies)
#descriptor.state #.Compiled
- #descriptor.registry final_registry}]]
+ #descriptor.registry final_registry]]]
(in [state
(#.Right [descriptor
(document.write key analysis_module)
@@ -266,7 +266,7 @@
(#.Some [source requirements temporary_payload])
(let [[temporary_buffer temporary_registry] temporary_payload]
(in [state
- (#.Left {#///.dependencies (|> requirements
+ (#.Left [#///.dependencies (|> requirements
(value@ #///directive.imports)
(list\each product.left))
#///.process (function (_ state archive)
@@ -284,5 +284,5 @@
(value@ #///directive.referrals)
(monad.each ! (execute! archive)))
temporary_payload (..get_current_payload temporary_payload)]
- (..iteration wrapper archive expander module source temporary_payload (..module_aliases analysis_module))))))})]))
- )))))}))))
+ (..iteration wrapper archive expander module source temporary_payload (..module_aliases analysis_module))))))])]))
+ )))))]))))
diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux
index 33c22c1f7..0452ef5b6 100644
--- a/stdlib/source/library/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux
@@ -66,12 +66,12 @@
<Operation> (as_is ///generation.Operation <type_vars>)]
(type: .public (Platform <type_vars>)
(Record
- {#&file_system (file.System Async)
+ [#&file_system (file.System Async)
#host (///generation.Host expression directive)
#phase (///generation.Phase <type_vars>)
#runtime (<Operation> [Registry Output])
#phase_wrapper (-> Archive (<Operation> ///phase.Wrapper))
- #write (-> directive Binary)}))
+ #write (-> directive Binary)]))
... TODO: Get rid of this
(type: (Action a)
@@ -131,12 +131,12 @@
(def: (runtime_descriptor registry)
(-> Registry Descriptor)
- {#descriptor.hash 0
+ [#descriptor.hash 0
#descriptor.name archive.runtime_module
#descriptor.file ""
#descriptor.references (set.empty text.hash)
#descriptor.state #.Compiled
- #descriptor.registry registry})
+ #descriptor.registry registry])
(def: runtime_document
(Document .Module)
@@ -304,14 +304,14 @@
(type: Dependence
(Record
- {#depends_on Mapping
- #depended_by Mapping}))
+ [#depends_on Mapping
+ #depended_by Mapping]))
(def: independence
Dependence
(let [empty (dictionary.empty text.hash)]
- {#depends_on empty
- #depended_by empty}))
+ [#depends_on empty
+ #depended_by empty]))
(def: (depend module import dependence)
(-> Module Module Dependence Dependence)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux
index 5bb42e533..5ad1e959e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux
@@ -92,6 +92,6 @@
(def: .public key
(Key .Module)
- (key.key {#signature.name (name_of ..compiler)
- #signature.version /version.version}
+ (key.key [#signature.name (name_of ..compiler)
+ #signature.version /version.version]
(module.empty 0)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
index 326c95b78..bdc195879 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
@@ -50,9 +50,9 @@
(type: .public (Variant a)
(Record
- {#lefts Nat
+ [#lefts Nat
#right? Bit
- #value a}))
+ #value a]))
(def: .public (tag lefts right?)
(-> Nat Bit Nat)
@@ -89,8 +89,8 @@
(type: .public (Branch' e)
(Record
- {#when Pattern
- #then e}))
+ [#when Pattern
+ #then e]))
(type: .public (Match' e)
[(Branch' e) (List (Branch' e))])
@@ -421,15 +421,15 @@
(def: fresh_bindings
(All (_ k v) (Bindings k v))
- {#.counter 0
- #.mappings (list)})
+ [#.counter 0
+ #.mappings (list)])
(def: fresh_scope
Scope
- {#.name (list)
+ [#.name (list)
#.inner 0
#.locals fresh_bindings
- #.captured fresh_bindings})
+ #.captured fresh_bindings])
(def: .public (with_scope action)
(All (_ a) (-> (Operation a) (Operation [Scope a])))
@@ -538,19 +538,19 @@
(def: type_context
Type_Context
- {#.ex_counter 0
+ [#.ex_counter 0
#.var_counter 0
- #.var_bindings (list)})
+ #.var_bindings (list)])
(def: .public (info version host)
(-> Version Text Info)
- {#.target host
+ [#.target host
#.version (%.nat version)
- #.mode #.Build})
+ #.mode #.Build])
(def: .public (state info)
(-> Info Lux)
- {#.info info
+ [#.info info
#.source ..dummy_source
#.location location.dummy
#.current_module #.None
@@ -562,4 +562,4 @@
#.scope_type_vars (list)
#.extensions []
#.eval (:as (-> Type Code (Meta Any)) [])
- #.host []})
+ #.host []])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux b/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux
index e5fb06e7d..ea9d244af 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux
@@ -22,37 +22,37 @@
(type: .public (Component state phase)
(Record
- {#state state
- #phase phase}))
+ [#state state
+ #phase phase]))
(type: .public (State anchor expression directive)
(Record
- {#analysis (Component analysis.State+
+ [#analysis (Component analysis.State+
analysis.Phase)
#synthesis (Component synthesis.State+
synthesis.Phase)
#generation (Component (generation.State+ anchor expression directive)
- (generation.Phase anchor expression directive))}))
+ (generation.Phase anchor expression directive))]))
(type: .public Import
(Record
- {#module Module
- #alias Text}))
+ [#module Module
+ #alias Text]))
(type: .public Requirements
(Record
- {#imports (List Import)
- #referrals (List Code)}))
+ [#imports (List Import)
+ #referrals (List Code)]))
(def: .public no_requirements
Requirements
- {#imports (list)
- #referrals (list)})
+ [#imports (list)
+ #referrals (list)])
(def: .public (merge_requirements left right)
(-> Requirements Requirements Requirements)
- {#imports (list\composite (value@ #imports left) (value@ #imports right))
- #referrals (list\composite (value@ #referrals left) (value@ #referrals right))})
+ [#imports (list\composite (value@ #imports left) (value@ #imports right))
+ #referrals (list\composite (value@ #referrals left) (value@ #referrals right))])
(template [<special> <general>]
[(type: .public (<special> anchor expression directive)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
index 6f9a03763..91b758c78 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
@@ -67,14 +67,14 @@
(type: .public (State anchor expression directive)
(Record
- {#module Module
+ [#module Module
#anchor (Maybe anchor)
#host (Host expression directive)
#buffer (Maybe (Buffer directive))
#registry artifact.Registry
#counter Nat
#context (Maybe artifact.ID)
- #log (Row Text)}))
+ #log (Row Text)]))
(template [<special> <general>]
[(type: .public (<special> anchor expression directive)
@@ -93,14 +93,14 @@
(-> (Host expression directive)
Module
(..State anchor expression directive)))
- {#module module
+ [#module module
#anchor #.None
#host host
#buffer #.None
#registry artifact.empty
#counter 0
#context #.None
- #log row.empty})
+ #log row.empty])
(def: .public empty_buffer Buffer row.empty)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
index c8cfe9c0e..9f5e6d12a 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
@@ -37,8 +37,8 @@
(type: (Fix a)
(-> a a))
-(def: (compile|primitive else code')
- (Fix (-> (Code' (Ann Location)) (Operation Analysis)))
+(def: (compile|literal archive compile else code')
+ (-> Archive Phase (Fix (-> (Code' (Ann Location)) (Operation Analysis))))
(case code'
(^template [<tag> <analyser>]
[(<tag> value)
@@ -50,12 +50,6 @@
[#.Frac /primitive.frac]
[#.Text /primitive.text])
- _
- (else code')))
-
-(def: (compile|structure archive compile else code')
- (-> Archive Phase (Fix (-> (Code' (Ann Location)) (Operation Analysis))))
- (case code'
(^ (#.Form (list& [_ (#.Tag tag)]
values)))
(case values
@@ -77,17 +71,8 @@
(#.Tag tag)
(/structure.tagged_sum compile tag archive (' []))
- (^ (#.Tuple (list)))
- /primitive.unit
-
- (^ (#.Tuple (list singleton)))
- (compile archive singleton)
-
(^ (#.Tuple elems))
- (/structure.product archive compile elems)
-
- (^ (#.Record pairs))
- (/structure.record archive compile pairs)
+ (/structure.record archive compile elems)
_
(else code')))
@@ -139,6 +124,6 @@
... The location must be set in the state for the sake
... of having useful error messages.
(/.with_location location
- (compile|primitive (compile|structure archive compile
- (compile|others expander archive compile))
- code')))))
+ (compile|literal archive compile
+ (compile|others expander archive compile)
+ code')))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
index d008fde0e..9777b1a31 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -188,66 +188,74 @@
(analyse_pattern #.None inputT singleton next)
[location (#.Tuple sub_patterns)]
- (/.with_location location
- (do {! ///.monad}
- [inputT' (simplify_case inputT)]
- (.case inputT'
- (#.Product _)
- (let [matches (loop [types (type.flat_tuple inputT')
- patterns sub_patterns
- output (: (List [Type Code])
- #.End)]
- (.case [types patterns]
- [#.End #.End]
- output
-
- [(#.Item headT #.End) (#.Item headP #.End)]
- (#.Item [headT headP] output)
-
- [remainingT (#.Item headP #.End)]
- (#.Item [(type.tuple remainingT) headP] output)
-
- [(#.Item headT #.End) remainingP]
- (#.Item [headT (code.tuple remainingP)] output)
-
- [(#.Item headT tailT) (#.Item headP tailP)]
- (recur tailT tailP (#.Item [headT headP] output))
-
- _
- (undefined)))]
- (do !
- [[memberP+ thenA] (list\mix (: (All (_ a)
- (-> [Type Code] (Operation [(List Pattern) a])
- (Operation [(List Pattern) a])))
- (function (_ [memberT memberC] then)
- (do !
- [[memberP [memberP+ thenA]] ((:as (All (_ a) (-> (Maybe Nat) Type Code (Operation a) (Operation [Pattern a])))
- analyse_pattern)
- #.None memberT memberC then)]
- (in [(list& memberP memberP+) thenA]))))
- (do !
- [nextA next]
- (in [(list) nextA]))
- matches)]
- (in [(/.pattern/tuple memberP+)
- thenA])))
-
- _
- (/.except ..cannot_match_with_pattern [inputT' pattern])
- )))
+ (do {! ///.monad}
+ [record (//structure.normal sub_patterns)
+ record_size,members,recordT (: (Operation (Maybe [Nat (List Code) Type]))
+ (.case record
+ (#.Some record)
+ (//structure.order record)
+
+ #.None
+ (in #.None)))]
+ (.case record_size,members,recordT
+ (#.Some [record_size members recordT])
+ (do !
+ [_ (.case inputT
+ (#.Var _id)
+ (//type.with_env
+ (check.check inputT recordT))
+
+ _
+ (in []))]
+ (analyse_pattern (#.Some record_size) inputT [location (#.Tuple members)] next))
+
+ #.None
+ (/.with_location location
+ (do {! ///.monad}
+ [inputT' (simplify_case inputT)]
+ (.case inputT'
+ (#.Product _)
+ (let [matches (loop [types (type.flat_tuple inputT')
+ patterns sub_patterns
+ output (: (List [Type Code])
+ #.End)]
+ (.case [types patterns]
+ [#.End #.End]
+ output
+
+ [(#.Item headT #.End) (#.Item headP #.End)]
+ (#.Item [headT headP] output)
+
+ [remainingT (#.Item headP #.End)]
+ (#.Item [(type.tuple remainingT) headP] output)
+
+ [(#.Item headT #.End) remainingP]
+ (#.Item [headT (code.tuple remainingP)] output)
+
+ [(#.Item headT tailT) (#.Item headP tailP)]
+ (recur tailT tailP (#.Item [headT headP] output))
+
+ _
+ (undefined)))]
+ (do !
+ [[memberP+ thenA] (list\mix (: (All (_ a)
+ (-> [Type Code] (Operation [(List Pattern) a])
+ (Operation [(List Pattern) a])))
+ (function (_ [memberT memberC] then)
+ (do !
+ [[memberP [memberP+ thenA]] ((:as (All (_ a) (-> (Maybe Nat) Type Code (Operation a) (Operation [Pattern a])))
+ analyse_pattern)
+ #.None memberT memberC then)]
+ (in [(list& memberP memberP+) thenA]))))
+ (do !
+ [nextA next]
+ (in [(list) nextA]))
+ matches)]
+ (in [(/.pattern/tuple memberP+)
+ thenA])))
- [location (#.Record record)]
- (do ///.monad
- [record (//structure.normal record)
- [record_size members recordT] (//structure.order record)
- _ (.case inputT
- (#.Var _id)
- (//type.with_env
- (check.check inputT recordT))
-
- _
- (in []))]
- (analyse_pattern (#.Some record_size) inputT [location (#.Tuple members)] next))
+ _
+ (/.except ..cannot_match_with_pattern [inputT' pattern]))))))
[location (#.Tag tag)]
(/.with_location location
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux
index b6817b6c8..0499c2d8a 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux
@@ -73,12 +73,12 @@
(def: .public (empty hash)
(-> Nat Module)
- {#.module_hash hash
+ [#.module_hash hash
#.module_aliases (list)
#.definitions (list)
#.imports (list)
#.module_annotations #.None
- #.module_state #.Active})
+ #.module_state #.Active])
(def: .public (set_annotations annotations)
(-> Code (Operation Any))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
index 0d01a4936..17423da65 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
@@ -144,8 +144,8 @@
(template [<name> <val_type>]
[(def: <name>
(Bindings Text [Type <val_type>])
- {#.counter 0
- #.mappings (list)})]
+ [#.counter 0
+ #.mappings (list)])]
[init_locals Nat]
[init_captured Variable]
@@ -153,10 +153,10 @@
(def: (scope parent_name child_name)
(-> (List Text) Text Scope)
- {#.name (list& child_name parent_name)
+ [#.name (list& child_name parent_name)
#.inner 0
#.locals init_locals
- #.captured init_captured})
+ #.captured init_captured])
(def: .public (with_scope name action)
(All (_ a) (-> Text (Operation a) (Operation a)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index f44670a38..2d6d3140c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -6,7 +6,8 @@
["." monad (#+ do)]]
[control
["." maybe]
- ["ex" exception (#+ exception:)]
+ ["." try]
+ ["." exception (#+ exception:)]
["." state]]
[data
["." name]
@@ -37,14 +38,16 @@
[archive (#+ Archive)]]]]]])
(exception: .public (invalid_variant_type {type Type} {tag Tag} {code Code})
- (ex.report ["Type" (%.type type)]
- ["Tag" (%.nat tag)]
- ["Expression" (%.code code)]))
+ (exception.report
+ ["Type" (%.type type)]
+ ["Tag" (%.nat tag)]
+ ["Expression" (%.code code)]))
(template [<name>]
[(exception: .public (<name> {type Type} {members (List Code)})
- (ex.report ["Type" (%.type type)]
- ["Expression" (%.code (` [(~+ members)]))]))]
+ (exception.report
+ ["Type" (%.type type)]
+ ["Expression" (%.code (` [(~+ members)]))]))]
[invalid_tuple_type]
[cannot_analyse_tuple]
@@ -55,40 +58,40 @@
(template [<name>]
[(exception: .public (<name> {type Type} {tag Tag} {code Code})
- (ex.report ["Type" (%.type type)]
- ["Tag" (%.nat tag)]
- ["Expression" (%.code code)]))]
+ (exception.report
+ ["Type" (%.type type)]
+ ["Tag" (%.nat tag)]
+ ["Expression" (%.code code)]))]
[cannot_analyse_variant]
[cannot_infer_numeric_tag]
)
-(exception: .public (record_keys_must_be_tags {key Code} {record (List [Code Code])})
- (ex.report ["Key" (%.code key)]
- ["Record" (%.code (code.record record))]))
-
(template [<name>]
[(exception: .public (<name> {key Name} {record (List [Name Code])})
- (ex.report ["Tag" (%.code (code.tag key))]
- ["Record" (%.code (code.record (list\each (function (_ [keyI valC])
- [(code.tag keyI) valC])
- record)))]))]
+ (exception.report
+ ["Tag" (%.code (code.tag key))]
+ ["Record" (%.code (code.record (list\each (function (_ [keyI valC])
+ [(code.tag keyI) valC])
+ record)))]))]
[cannot_repeat_tag]
)
-(exception: .public (tag_does_not_belong_to_record {key Name} {type Type})
- (ex.report ["Tag" (%.code (code.tag key))]
- ["Type" (%.type type)]))
+(exception: .public (slot_does_not_belong_to_record {key Name} {type Type})
+ (exception.report
+ ["Tag" (%.code (code.tag key))]
+ ["Type" (%.type type)]))
(exception: .public (record_size_mismatch {expected Nat} {actual Nat} {type Type} {record (List [Name Code])})
- (ex.report ["Expected" (%.nat expected)]
- ["Actual" (%.nat actual)]
- ["Type" (%.type type)]
- ["Expression" (%.code (|> record
- (list\each (function (_ [keyI valueC])
- [(code.tag keyI) valueC]))
- code.record))]))
+ (exception.report
+ ["Expected" (%.nat expected)]
+ ["Actual" (%.nat actual)]
+ ["Type" (%.type type)]
+ ["Expression" (%.code (|> record
+ (list\each (function (_ [keyI valueC])
+ [(code.tag keyI) valueC]))
+ code.record))]))
(def: .public (sum analyse lefts right? archive)
(-> Phase Nat Bit Phase)
@@ -174,6 +177,12 @@
(loop [membersT+ (type.flat_tuple expectedT)
membersC+ members]
(case [membersT+ membersC+]
+ [(#.Item memberT #.End) (#.Item memberC #.End)]
+ (do !
+ [memberA (//type.with_type memberT
+ (analyse archive memberC))]
+ (in (list memberA)))
+
[(#.Item memberT #.End) _]
(//type.with_type memberT
(\ ! each (|>> list) (analyse archive (code.tuple membersC+))))
@@ -188,7 +197,7 @@
(analyse archive memberC))
memberA+ (recur membersT+' membersC+')]
(in (#.Item memberA memberA+)))
-
+
_
(/.except ..cannot_analyse_tuple [expectedT members]))))]
(in (/.tuple membersA+))))
@@ -284,81 +293,117 @@
... Normalization just means that all the tags get resolved to their
... canonical form (with their corresponding module identified).
(def: .public (normal record)
- (-> (List [Code Code]) (Operation (List [Name Code])))
- (monad.each ///.monad
- (function (_ [key val])
- (case key
- [_ (#.Tag key)]
- (do ///.monad
- [key (///extension.lifted (meta.normal key))]
- (in [key val]))
+ (-> (List Code) (Operation (Maybe (List [Name Code]))))
+ (loop [input record
+ output (: (List [Name Code])
+ #.End)]
+ (case input
+ (^ (list& [_ (#.Tag slotH)] valueH tail))
+ (do ///.monad
+ [slotH (///extension.lifted (meta.normal slotH))]
+ (recur tail (#.Item [slotH valueH] output)))
+
+ #.End
+ (\ ///.monad in (#.Some output))
- _
- (/.except ..record_keys_must_be_tags [key record])))
- record))
+ _
+ (\ ///.monad in #.None))))
... Lux already possesses the means to analyse tuples, so
... re-implementing the same functionality for records makes no sense.
... Records, thus, get transformed into tuples by ordering the elements.
(def: .public (order record)
- (-> (List [Name Code]) (Operation [Nat (List Code) Type]))
+ (-> (List [Name Code]) (Operation (Maybe [Nat (List Code) Type])))
(case record
... empty_record = empty_tuple = unit/any = []
#.End
- (\ ///.monad in [0 (list) Any])
+ (\ ///.monad in (#.Some [0 (list) Any]))
(#.Item [head_k head_v] _)
(do {! ///.monad}
- [head_k (///extension.lifted (meta.normal head_k))
- [_ tag_set recordT] (///extension.lifted (meta.tag head_k))
- .let [size_record (list.size record)
- size_ts (list.size tag_set)]
- _ (if (n.= size_ts size_record)
- (in [])
- (/.except ..record_size_mismatch [size_ts size_record recordT record]))
- .let [tuple_range (list.indices size_ts)
- tag->idx (dictionary.of_list name.hash (list.zipped/2 tag_set tuple_range))]
- idx->val (monad.mix !
- (function (_ [key val] idx->val)
- (do !
- [key (///extension.lifted (meta.normal key))]
- (case (dictionary.value key tag->idx)
- (#.Some idx)
- (if (dictionary.key? idx->val idx)
- (/.except ..cannot_repeat_tag [key record])
- (in (dictionary.has idx val idx->val)))
-
- #.None
- (/.except ..tag_does_not_belong_to_record [key recordT]))))
- (: (Dictionary Nat Code)
- (dictionary.empty n.hash))
- record)
- .let [ordered_tuple (list\each (function (_ idx)
- (maybe.trusted (dictionary.value idx idx->val)))
- tuple_range)]]
- (in [size_ts ordered_tuple recordT]))
+ [slotH' (///extension.lifted
+ (do meta.monad
+ [head_k (meta.normal head_k)]
+ (meta.try (meta.slot head_k))))]
+ (case slotH'
+ (#try.Success [_ slot_set recordT])
+ (do !
+ [.let [size_record (list.size record)
+ size_ts (list.size slot_set)]
+ _ (if (n.= size_ts size_record)
+ (in [])
+ (/.except ..record_size_mismatch [size_ts size_record recordT record]))
+ .let [tuple_range (list.indices size_ts)
+ tag->idx (dictionary.of_list name.hash (list.zipped/2 slot_set tuple_range))]
+ idx->val (monad.mix !
+ (function (_ [key val] idx->val)
+ (do !
+ [key (///extension.lifted (meta.normal key))]
+ (case (dictionary.value key tag->idx)
+ (#.Some idx)
+ (if (dictionary.key? idx->val idx)
+ (/.except ..cannot_repeat_tag [key record])
+ (in (dictionary.has idx val idx->val)))
+
+ #.None
+ (/.except ..slot_does_not_belong_to_record [key recordT]))))
+ (: (Dictionary Nat Code)
+ (dictionary.empty n.hash))
+ record)
+ .let [ordered_tuple (list\each (function (_ idx)
+ (maybe.trusted (dictionary.value idx idx->val)))
+ tuple_range)]]
+ (in (#.Some [size_ts ordered_tuple recordT])))
+
+ (#try.Failure error)
+ (in #.None)))
))
(def: .public (record archive analyse members)
- (-> Archive Phase (List [Code Code]) (Operation Analysis))
+ (-> Archive Phase (List Code) (Operation Analysis))
(case members
(^ (list))
//primitive.unit
- (^ (list [_ singletonC]))
+ (^ (list singletonC))
(analyse archive singletonC)
+ (^ (list [_ (#.Tag pseudo_slot)] singletonC))
+ (do {! ///.monad}
+ [head_k (///extension.lifted (meta.normal pseudo_slot))
+ slot (///extension.lifted (meta.try (meta.slot head_k)))]
+ (case slot
+ (#try.Success [_ slot_set recordT])
+ (case (list.size slot_set)
+ 1 (analyse archive singletonC)
+ _ (..product archive analyse members))
+
+ _
+ (..product archive analyse members)))
+
_
(do {! ///.monad}
- [members (normal members)
- [record_size membersC recordT] (..order members)
- expectedT (///extension.lifted meta.expected_type)]
- (case expectedT
- (#.Var _)
+ [?members (normal members)]
+ (case ?members
+ #.None
+ (..product archive analyse members)
+
+ (#.Some slots)
(do !
- [inferenceT (//inference.record record_size recordT)
- [inferredT membersA] (//inference.general archive analyse inferenceT membersC)]
- (in (/.tuple membersA)))
+ [record_size,membersC,recordT (..order slots)]
+ (case record_size,membersC,recordT
+ #.None
+ (..product archive analyse members)
- _
- (..product archive analyse membersC)))))
+ (#.Some [record_size membersC recordT])
+ (do !
+ [expectedT (///extension.lifted meta.expected_type)]
+ (case expectedT
+ (#.Var _)
+ (do !
+ [inferenceT (//inference.record record_size recordT)
+ [inferredT membersA] (//inference.general archive analyse inferenceT membersC)]
+ (in (/.tuple membersA)))
+
+ _
+ (..product archive analyse membersC)))))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
index f47780c61..e89d68ac8 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
@@ -52,8 +52,8 @@
(type: .public (State s i o)
(Record
- {#bundle (Bundle s i o)
- #state s}))
+ [#bundle (Bundle s i o)
+ #state s]))
(type: .public (Operation s i o v)
(//.Operation (State s i o) v))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
index 05a6aa294..7efd44bcd 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -190,8 +190,8 @@
(type: Member
(Record
- {#class External
- #member Text}))
+ [#class External
+ #member Text]))
(def: member
(Parser Member)
@@ -199,9 +199,9 @@
(type: Method_Signature
(Record
- {#method .Type
+ [#method .Type
#deprecated? Bit
- #exceptions (List .Type)}))
+ #exceptions (List .Type)]))
(template [<name>]
[(exception: .public (<name> {type .Type})
@@ -1959,23 +1959,23 @@
2
(#/////analysis.Case (/////analysis.unit)
- [{#/////analysis.when
+ [[#/////analysis.when
(#/////analysis.Bind 2)
#/////analysis.then
- bodyA}
+ bodyA]
(list)])
_
(#/////analysis.Case (/////analysis.unit)
- [{#/////analysis.when
+ [[#/////analysis.when
(#/////analysis.Complex
(#/////analysis.Tuple (|> arity
list.indices
(list\each (|>> (n.+ 2) #/////analysis.Bind)))))
#/////analysis.then
- bodyA}
+ bodyA]
(list)]))))
(def: .public (analyse_overriden_method analyse archive selfT mapping supers method)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
index 02037b6b0..c7e17a992 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
@@ -171,9 +171,9 @@
(def: (constraint name)
(-> Text Constraint)
- {#type.name name
+ [#type.name name
#type.super_class (type.class "java.lang.Object" (list))
- #type.super_interfaces (list)})
+ #type.super_interfaces (list)])
(def: constant::modifier
(Modifier field.Field)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
index f2ffaccae..46dd5d709 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
@@ -240,8 +240,9 @@
(All (_ anchor expression directive)
(-> (List Text) Type (Operation anchor expression directive (List Any))))
(/////directive.lifted_generation
- (monad.each phase.monad (function (_ tag)
- (/////generation.log! (format "#" tag " : Tag of " (%.type owner))))
+ (monad.each phase.monad
+ (function (_ tag)
+ (/////generation.log! (format "#" tag " : Tag of " (%.type owner))))
tags)))
(def: (def::type_tagged expander host_analysis)
@@ -308,8 +309,8 @@
_ (module.alias alias module))))
imports)]
(module.set_annotations annotationsV)))]
- (in {#/////directive.imports imports
- #/////directive.referrals (list)})))]))
+ (in [#/////directive.imports imports
+ #/////directive.referrals (list)])))]))
(exception: .public (cannot_alias_an_alias {local Alias} {foreign Alias} {target Name})
(exception.report
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
index f5bde1d64..41d204e66 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
@@ -317,9 +317,9 @@
(_.set! value (_.apply/1 op [..unit]))
(_.return (..right value)))
(list (with_vars [error]
- {#_.class (_.constant "Exception")
+ [#_.class (_.constant "Exception")
#_.exception error
- #_.handler (_.return (..left (_.do "getMessage" (list) error)))})))))
+ #_.handler (_.return (..left (_.do "getMessage" (list) error)))])))))
(runtime: (lux//program_args inputs)
(with_vars [head tail]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
index 4cfc0dc5d..4347ace80 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
@@ -318,13 +318,13 @@
(type: .public Storage
(Record
- {#bindings (Set Register)
- #dependencies (Set Variable)}))
+ [#bindings (Set Register)
+ #dependencies (Set Variable)]))
(def: empty
Storage
- {#bindings (set.empty n.hash)
- #dependencies (set.empty ///reference/variable.hash)})
+ [#bindings (set.empty n.hash)
+ #dependencies (set.empty ///reference/variable.hash)])
... TODO: Use this to declare all local variables at the beginning of
... script functions.
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux
index 84d91d48d..40689678f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux
@@ -257,21 +257,21 @@
(|> bodyS'
(grow env')
(\ ! each (function (_ body)
- {#/.environment environment
+ [#/.environment environment
#/.arity (++ down_arity')
- #/.body body})))
+ #/.body body])))
_
- (in {#/.environment environment
+ (in [#/.environment environment
#/.arity 1
- #/.body bodyS})))]
+ #/.body bodyS])))]
(in (if currying?
(/.function/abstraction abstraction)
(case (//loop.optimization false 1 (list) abstraction)
(#.Some [startL initsL bodyL])
- (/.function/abstraction {#/.environment environment
+ (/.function/abstraction [#/.environment environment
#/.arity (value@ #/.arity abstraction)
- #/.body (/.loop/scope [startL initsL bodyL])})
+ #/.body (/.loop/scope [startL initsL bodyL])])
#.None
(/.function/abstraction abstraction))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
index 882a8c5d6..b4e79bd6d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
@@ -144,9 +144,9 @@
(value@ #/.inits)
(monad.each ! (recur false)))
iteration' (recur return? (value@ #/.iteration scope))]
- (in (/.loop/scope {#/.start (|> scope (value@ #/.start) (register_optimization offset))
+ (in (/.loop/scope [#/.start (|> scope (value@ #/.start) (register_optimization offset))
#/.inits inits'
- #/.iteration iteration'})))
+ #/.iteration iteration'])))
(^ (/.loop/recur args))
(|> args
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
index ec9c6d81e..9b4e1ad57 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
@@ -39,9 +39,9 @@
(type: .public State
(Record
- {#locals Nat
+ [#locals Nat
... https://en.wikipedia.org/wiki/Currying
- #currying? Bit}))
+ #currying? Bit]))
(def: .public fresh_resolver
Resolver
@@ -49,8 +49,8 @@
(def: .public init
State
- {#locals 0
- #currying? false})
+ [#locals 0
+ #currying? false])
(type: .public Primitive
(Variant
@@ -88,14 +88,14 @@
(type: .public (Abstraction' s)
(Record
- {#environment (Environment s)
+ [#environment (Environment s)
#arity Arity
- #body s}))
+ #body s]))
(type: .public (Apply' s)
(Record
- {#function s
- #arguments (List s)}))
+ [#function s
+ #arguments (List s)]))
(type: .public (Branch s)
(Variant
@@ -106,9 +106,9 @@
(type: .public (Scope s)
(Record
- {#start Register
+ [#start Register
#inits (List s)
- #iteration s}))
+ #iteration s]))
(type: .public (Loop s)
(Variant
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
index d326a2bbb..d54234a8e 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
@@ -78,8 +78,8 @@
{}
(Record
- {#next ID
- #resolver (Dictionary Module [ID (Maybe [Descriptor (Document Any) Output])])})
+ [#next ID
+ #resolver (Dictionary Module [ID (Maybe [Descriptor (Document Any) Output])])])
(def: next
(-> Archive ID)
@@ -87,8 +87,8 @@
(def: .public empty
Archive
- (:abstraction {#next 0
- #resolver (dictionary.empty text.hash)}))
+ (:abstraction [#next 0
+ #resolver (dictionary.empty text.hash)]))
(def: .public (id module archive)
(-> Module Archive (Try ID))
@@ -279,9 +279,9 @@
_ (exception.assertion ..corrupt_data []
(correct_reservations? reservations))]
(in (:abstraction
- {#next next
+ [#next next
#resolver (list\mix (function (_ [module id] archive)
(dictionary.has module [id #.None] archive))
(value@ #resolver (:representation ..empty))
- reservations)}))))
+ reservations)]))))
)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
index 7a2d25b1a..23a9eae99 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
@@ -36,20 +36,20 @@
(type: .public Artifact
(Record
- {#id ID
- #category Category}))
+ [#id ID
+ #category Category]))
(abstract: .public Registry
{}
(Record
- {#artifacts (Row Artifact)
- #resolver (Dictionary Text ID)})
+ [#artifacts (Row Artifact)
+ #resolver (Dictionary Text ID)])
(def: .public empty
Registry
- (:abstraction {#artifacts row.empty
- #resolver (dictionary.empty text.hash)}))
+ (:abstraction [#artifacts row.empty
+ #resolver (dictionary.empty text.hash)]))
(def: .public artifacts
(-> Registry (Row Artifact))
@@ -65,8 +65,8 @@
[id
(|> registry
:representation
- (revised@ #artifacts (row.suffix {#id id
- #category #Anonymous}))
+ (revised@ #artifacts (row.suffix [#id id
+ #category #Anonymous]))
:abstraction)]))
(template [<tag> <create> <fetch>]
@@ -76,8 +76,8 @@
[id
(|> registry
:representation
- (revised@ #artifacts (row.suffix {#id id
- #category (<tag> name)}))
+ (revised@ #artifacts (row.suffix [#id id
+ #category (<tag> name)]))
(revised@ #resolver (dictionary.has name id))
:abstraction)]))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux
index 5a30c2c50..fec78853e 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux
@@ -20,12 +20,12 @@
(type: .public Descriptor
(Record
- {#name Module
+ [#name Module
#file Path
#hash Nat
#state Module_State
#references (Set Module)
- #registry Registry}))
+ #registry Registry]))
(def: .public writer
(Writer Descriptor)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux
index 07c8b0841..6bc6d4e80 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux
@@ -29,8 +29,8 @@
{}
(Record
- {#signature Signature
- #content d})
+ [#signature Signature
+ #content d])
(def: .public (read key document)
(All (_ d) (-> (Key d) (Document Any) (Try d)))
@@ -49,8 +49,8 @@
(def: .public (write key content)
(All (_ d) (-> (Key d) d (Document d)))
- (:abstraction {#signature (key.signature key)
- #content content}))
+ (:abstraction [#signature (key.signature key)
+ #content content]))
(def: .public (check key document)
(All (_ d) (-> (Key d) (Document Any) (Try (Document d))))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
index ebe18755a..8dae11fe4 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
@@ -21,8 +21,8 @@
(type: .public Signature
(Record
- {#name Name
- #version Version}))
+ [#name Name
+ #version Version]))
(def: .public equivalence
(Equivalence Signature)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
index 9796bdcfb..8944ceeb8 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
@@ -42,8 +42,8 @@
(type: Dependency
(Record
- {#module Module
- #imports Ancestry}))
+ [#module Module
+ #imports Ancestry]))
(def: .public graph
(-> (List Dependency) Graph)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
index 797d1e2e4..250849940 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
@@ -129,10 +129,10 @@
[[path binary] (..find_any_source_file fs importer import contexts partial_host_extension module)]
(case (\ utf8.codec decoded binary)
(#try.Success code)
- (in {#////.module module
+ (in [#////.module module
#////.file path
#////.hash (text\hash code)
- #////.code code})
+ #////.code code])
(#try.Failure _)
(async\in (exception.except ..cannot_read_module [module])))))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
index c1fdd9d5d..2531459ce 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
@@ -88,12 +88,12 @@
(def: owner
tar.Owner
- {#tar.name tar.anonymous
- #tar.id tar.no_id})
+ [#tar.name tar.anonymous
+ #tar.id tar.no_id])
(def: ownership
- {#tar.user ..owner
- #tar.group ..owner})
+ [#tar.user ..owner
+ #tar.group ..owner])
(def: (write_module now mapping [module [module_id [descriptor document output]]])
(-> Instant (Dictionary Module archive.ID)
diff --git a/stdlib/source/library/lux/tool/interpreter.lux b/stdlib/source/library/lux/tool/interpreter.lux
index dd6713ff4..eb4ac9de7 100644
--- a/stdlib/source/library/lux/tool/interpreter.lux
+++ b/stdlib/source/library/lux/tool/interpreter.lux
@@ -163,9 +163,9 @@
(type: (Context anchor expression directive)
(Record
- {#configuration Configuration
+ [#configuration Configuration
#state (State+ anchor expression directive)
- #source Source}))
+ #source Source]))
(with_expansions [<Context> (as_is (Context anchor expression directive))]
(def: (read_eval_print context)
@@ -201,9 +201,9 @@
(! Any)))
(do {! Monad<!>}
[state (initialize Monad<!> Console<!> platform configuration)]
- (loop [context {#configuration configuration
+ (loop [context [#configuration configuration
#state state
- #source ..fresh_source}
+ #source ..fresh_source]
multi_line? #0]
(do !
[_ (if multi_line?
diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux
index a9eeac328..0ef1ba1af 100644
--- a/stdlib/source/library/lux/type.lux
+++ b/stdlib/source/library/lux/type.lux
@@ -433,8 +433,8 @@
(type: Typed
(Record
- {#type Code
- #expression Code}))
+ [#type Code
+ #expression Code]))
(def: typed
(Parser Typed)
diff --git a/stdlib/source/library/lux/type/abstract.lux b/stdlib/source/library/lux/type/abstract.lux
index 23e7b4378..bd2fe150f 100644
--- a/stdlib/source/library/lux/type/abstract.lux
+++ b/stdlib/source/library/lux/type/abstract.lux
@@ -36,10 +36,10 @@
(type: .public Frame
(Record
- {#name Text
+ [#name Text
#type_vars (List Code)
#abstraction Code
- #representation Code}))
+ #representation Code]))
(def: frames
(Stack Frame)
diff --git a/stdlib/source/library/lux/type/check.lux b/stdlib/source/library/lux/type/check.lux
index a42a519df..ed8afab5b 100644
--- a/stdlib/source/library/lux/type/check.lux
+++ b/stdlib/source/library/lux/type/check.lux
@@ -323,9 +323,9 @@
(def: .public fresh_context
Type_Context
- {#.var_counter 0
+ [#.var_counter 0
#.ex_counter 0
- #.var_bindings (list)})
+ #.var_bindings (list)])
(def: (attempt op)
(All (_ a) (-> (Check a) (Check (Maybe a))))
diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux
index c092139d2..fe815482d 100644
--- a/stdlib/source/library/lux/type/implicit.lux
+++ b/stdlib/source/library/lux/type/implicit.lux
@@ -88,7 +88,7 @@
["" simple_name]
(meta.either (do meta.monad
[member (meta.normal member)
- _ (meta.tag member)]
+ _ (meta.slot member)]
(in member))
(do {! meta.monad}
[this_module_name meta.current_module_name
@@ -114,7 +114,7 @@
(-> Name (Meta [Nat Type]))
(do meta.monad
[member (member_name member)
- [idx tag_list sig_type] (meta.tag member)]
+ [idx tag_list sig_type] (meta.slot member)]
(in [idx sig_type])))
(def: (available_definitions source_module target_module constants aggregate)
@@ -203,8 +203,8 @@
(type: Instance
(Rec Instance
(Record
- {#constructor Name
- #dependencies (List Instance)})))
+ [#constructor Name
+ #dependencies (List Instance)])))
(def: (candidate_provision provision context dep alts)
(-> (-> Lux Type_Context Type (Check Instance))
diff --git a/stdlib/source/library/lux/type/quotient.lux b/stdlib/source/library/lux/type/quotient.lux
index 1436e4597..163af82d6 100644
--- a/stdlib/source/library/lux/type/quotient.lux
+++ b/stdlib/source/library/lux/type/quotient.lux
@@ -26,15 +26,15 @@
{}
(Record
- {#value t
- #label c})
+ [#value t
+ #label c])
(def: .public (quotient class value)
(All (_ t c %)
(-> (Class t c %) t
(Quotient t c %)))
- (:abstraction {#value value
- #label ((:representation Class class) value)}))
+ (:abstraction [#value value
+ #label ((:representation Class class) value)]))
(template [<name> <output> <slot>]
[(def: .public <name>
diff --git a/stdlib/source/library/lux/type/refinement.lux b/stdlib/source/library/lux/type/refinement.lux
index 7cecd9111..93d962ae3 100644
--- a/stdlib/source/library/lux/type/refinement.lux
+++ b/stdlib/source/library/lux/type/refinement.lux
@@ -15,8 +15,8 @@
{}
(Record
- {#value t
- #predicate (Predicate t)})
+ [#value t
+ #predicate (Predicate t)])
(type: .public (Refiner t %)
(-> t (Maybe (Refined t %))))
@@ -27,8 +27,8 @@
(-> (Predicate t) (Refiner t %))))
(function (_ value)
(if (predicate value)
- (#.Some (:abstraction {#value value
- #predicate predicate}))
+ (#.Some (:abstraction [#value value
+ #predicate predicate]))
#.None)))
(template [<name> <output> <slot>]
@@ -48,8 +48,8 @@
(let [(^slots [#value #predicate]) (:representation refined)
value' (transform value)]
(if (predicate value')
- (#.Some (:abstraction {#value value'
- #predicate predicate}))
+ (#.Some (:abstraction [#value value'
+ #predicate predicate]))
#.None))))
)
diff --git a/stdlib/source/library/lux/world/db/jdbc.lux b/stdlib/source/library/lux/world/db/jdbc.lux
index 67b8d5354..8fb53e9b0 100644
--- a/stdlib/source/library/lux/world/db/jdbc.lux
+++ b/stdlib/source/library/lux/world/db/jdbc.lux
@@ -52,18 +52,18 @@
(type: .public Credentials
(Record
- {#url URL
+ [#url URL
#user Text
- #password Text}))
+ #password Text]))
(type: .public ID
Int)
(type: .public (Statement input)
(Record
- {#sql sql.Statement
+ [#sql sql.Statement
#input (Input input)
- #value input}))
+ #value input]))
(template [<name> <forge> <output>]
[(capability: .public (<name> ! i)
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index c66e0d4f9..377f07b4f 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -995,9 +995,9 @@
(type: Mock_File
(Record
- {#mock_last_modified Instant
+ [#mock_last_modified Instant
#mock_can_execute Bit
- #mock_content Binary}))
+ #mock_content Binary]))
(type: Mock
(Rec Mock
@@ -1042,9 +1042,9 @@
(case tail
#.End
(#try.Success (dictionary.has head
- (#.Left {#mock_last_modified now
+ (#.Left [#mock_last_modified now
#mock_can_execute false
- #mock_content content})
+ #mock_content content])
directory))
(#.Item _)
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux
index cb316fbd4..b094a1e0d 100644
--- a/stdlib/source/library/lux/world/file/watch.lux
+++ b/stdlib/source/library/lux/world/file/watch.lux
@@ -36,24 +36,24 @@
{}
(Record
- {#creation Bit
+ [#creation Bit
#modification Bit
- #deletion Bit})
+ #deletion Bit])
(def: none
Concern
(:abstraction
- {#creation false
+ [#creation false
#modification false
- #deletion false}))
+ #deletion false]))
(template [<concern> <predicate> <event> <create> <modify> <delete>]
[(def: .public <concern>
Concern
(:abstraction
- {#creation <create>
+ [#creation <create>
#modification <modify>
- #deletion <delete>}))
+ #deletion <delete>]))
(def: .public <predicate>
(Predicate Concern)
@@ -70,9 +70,9 @@
(def: .public (also left right)
(-> Concern Concern Concern)
(:abstraction
- {#creation (or (..creation? left) (..creation? right))
+ [#creation (or (..creation? left) (..creation? right))
#modification (or (..modification? left) (..modification? right))
- #deletion (or (..deletion? left) (..deletion? right))}))
+ #deletion (or (..deletion? left) (..deletion? right))]))
(def: .public all
Concern
diff --git a/stdlib/source/library/lux/world/input/keyboard.lux b/stdlib/source/library/lux/world/input/keyboard.lux
index b22f9b792..b3b64f1d1 100644
--- a/stdlib/source/library/lux/world/input/keyboard.lux
+++ b/stdlib/source/library/lux/world/input/keyboard.lux
@@ -99,14 +99,14 @@
(type: .public Press
(Record
- {#pressed? Bit
- #input Key}))
+ [#pressed? Bit
+ #input Key]))
(template [<bit> <name>]
[(def: .public (<name> key)
(-> Key Press)
- {#pressed? <bit>
- #input key})]
+ [#pressed? <bit>
+ #input key])]
[#0 release]
[#1 press]
diff --git a/stdlib/source/library/lux/world/net.lux b/stdlib/source/library/lux/world/net.lux
index 606202f9b..4f5626900 100644
--- a/stdlib/source/library/lux/world/net.lux
+++ b/stdlib/source/library/lux/world/net.lux
@@ -13,5 +13,5 @@
(type: .public Location
(Record
- {#address Address
- #port Port}))
+ [#address Address
+ #port Port]))
diff --git a/stdlib/source/library/lux/world/net/http.lux b/stdlib/source/library/lux/world/net/http.lux
index 75b3c7b86..b34b904c9 100644
--- a/stdlib/source/library/lux/world/net/http.lux
+++ b/stdlib/source/library/lux/world/net/http.lux
@@ -53,28 +53,28 @@
(type: .public Address
(Record
- {#port Port
- #host Text}))
+ [#port Port
+ #host Text]))
(type: .public Identification
(Record
- {#local Address
- #remote Address}))
+ [#local Address
+ #remote Address]))
(type: .public Protocol
(Record
- {#version Version
- #scheme Scheme}))
+ [#version Version
+ #scheme Scheme]))
(type: .public Resource
(Record
- {#method Method
- #uri URI}))
+ [#method Method
+ #uri URI]))
(type: .public (Message !)
(Record
- {#headers Headers
- #body (Body !)}))
+ [#headers Headers
+ #body (Body !)]))
(type: .public (Request !)
[Identification Protocol Resource (Message !)])
diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux
index 0292ab79b..c3d70e625 100644
--- a/stdlib/source/library/lux/world/net/http/client.lux
+++ b/stdlib/source/library/lux/world/net/http/client.lux
@@ -211,8 +211,8 @@
java/net/URLConnection::getInputStream
(\ ! each (|>> java/io/BufferedInputStream::new)))]
(in [(.nat status)
- {#//.headers headers
- #//.body (..default_body input)}]))))))]
+ [#//.headers headers
+ #//.body (..default_body input)]]))))))]
(for {@.old (as_is <jvm>)
@.jvm (as_is <jvm>)}
(as_is)))
diff --git a/stdlib/source/library/lux/world/net/http/mime.lux b/stdlib/source/library/lux/world/net/http/mime.lux
index f52b63136..5df977504 100644
--- a/stdlib/source/library/lux/world/net/http/mime.lux
+++ b/stdlib/source/library/lux/world/net/http/mime.lux
@@ -9,10 +9,10 @@
abstract]]])
(abstract: .public MIME
- Text
-
{#doc "Multipurpose Internet Mail Extensions"}
+ Text
+
(def: .public mime
(-> Text MIME)
(|>> :abstraction))
diff --git a/stdlib/source/library/lux/world/net/http/response.lux b/stdlib/source/library/lux/world/net/http/response.lux
index b129584d5..26a1e10fd 100644
--- a/stdlib/source/library/lux/world/net/http/response.lux
+++ b/stdlib/source/library/lux/world/net/http/response.lux
@@ -32,10 +32,10 @@
(let [body (frp\in (\ encoding.utf8 encoded ""))]
(function (_ status)
[status
- {#//.headers (|> context.empty
+ [#//.headers (|> context.empty
(header.content_length 0)
(header.content_type mime.utf_8))
- #//.body body}])))
+ #//.body body]])))
(def: .public (temporary_redirect to)
(-> URL Response)
@@ -49,10 +49,10 @@
(def: .public (content status type data)
(-> Status MIME Binary Response)
[status
- {#//.headers (|> context.empty
+ [#//.headers (|> context.empty
(header.content_length (binary.size data))
(header.content_type type))
- #//.body (frp\in data)}])
+ #//.body (frp\in data)]])
(def: .public bad_request
(-> Text Response)
diff --git a/stdlib/source/library/lux/world/output/video/resolution.lux b/stdlib/source/library/lux/world/output/video/resolution.lux
index 8bf8a1bd7..3f79a0040 100644
--- a/stdlib/source/library/lux/world/output/video/resolution.lux
+++ b/stdlib/source/library/lux/world/output/video/resolution.lux
@@ -12,8 +12,8 @@
(type: .public Resolution
(Record
- {#width Nat
- #height Nat}))
+ [#width Nat
+ #height Nat]))
(def: .public hash
(Hash Resolution)
@@ -27,8 +27,8 @@
(template [<name> <width> <height>]
[(def: .public <name>
Resolution
- {#width <width>
- #height <height>})]
+ [#width <width>
+ #height <height>])]
[svga 800 600]
[wsvga 1024 600]
diff --git a/stdlib/source/library/lux/world/service/authentication.lux b/stdlib/source/library/lux/world/service/authentication.lux
index 092d26454..1916f1238 100644
--- a/stdlib/source/library/lux/world/service/authentication.lux
+++ b/stdlib/source/library/lux/world/service/authentication.lux
@@ -19,7 +19,8 @@
(Capability [account] (! (Try Any))))
(type: .public (Service ! account secret value)
- {#can_register (Can_Register ! account secret value)
- #can_authenticate (Can_Authenticate ! account secret value)
- #can_reset (Can_Reset ! account secret)
- #can_forget (Can_Forget ! account)})
+ (Record
+ [#can_register (Can_Register ! account secret value)
+ #can_authenticate (Can_Authenticate ! account secret value)
+ #can_reset (Can_Reset ! account secret)
+ #can_forget (Can_Forget ! account)]))
diff --git a/stdlib/source/library/lux/world/service/crud.lux b/stdlib/source/library/lux/world/service/crud.lux
index 056628491..5635bc1c3 100644
--- a/stdlib/source/library/lux/world/service/crud.lux
+++ b/stdlib/source/library/lux/world/service/crud.lux
@@ -11,8 +11,9 @@
(type: .public ID Nat)
(type: .public Time
- {#created Instant
- #updated Instant})
+ (Record
+ [#created Instant
+ #updated Instant]))
(capability: .public (Can_Create ! entity)
(can_create [Instant entity] (! (Try ID))))
@@ -27,7 +28,8 @@
(can_delete ID (! (Try Any))))
(type: .public (CRUD ! entity)
- {#can_create (Can_Create ! entity)
- #can_retrieve (Can_Retrieve ! entity)
- #can_update (Can_Update ! entity)
- #can_delete (Can_Delete ! entity)})
+ (Record
+ [#can_create (Can_Create ! entity)
+ #can_retrieve (Can_Retrieve ! entity)
+ #can_update (Can_Update ! entity)
+ #can_delete (Can_Delete ! entity)]))
diff --git a/stdlib/source/library/lux/world/service/inventory.lux b/stdlib/source/library/lux/world/service/inventory.lux
index 6a5fac798..6f1ca494a 100644
--- a/stdlib/source/library/lux/world/service/inventory.lux
+++ b/stdlib/source/library/lux/world/service/inventory.lux
@@ -10,8 +10,9 @@
Nat)
(type: .public Ownership
- {#owner ID
- #property ID})
+ (Record
+ [#owner ID
+ #property ID]))
(capability: .public (Can_Own !)
(can_own Ownership (! (Try Any))))
@@ -26,7 +27,8 @@
(can_list_property ID (! (Try (List ID)))))
(type: .public (Inventory !)
- {#can_own (Can_Own !)
- #can_disown (Can_Disown !)
- #can_check (Can_Check !)
- #can_list_property (Can_List_Property !)})
+ (Record
+ [#can_own (Can_Own !)
+ #can_disown (Can_Disown !)
+ #can_check (Can_Check !)
+ #can_list_property (Can_List_Property !)]))
diff --git a/stdlib/source/library/lux/world/service/journal.lux b/stdlib/source/library/lux/world/service/journal.lux
index 648e084d6..311be09bf 100644
--- a/stdlib/source/library/lux/world/service/journal.lux
+++ b/stdlib/source/library/lux/world/service/journal.lux
@@ -13,12 +13,13 @@
["." instant (#+ Instant) ("#\." equivalence)]]]])
(type: .public (Entry a)
- {#what a
- #why Text
- #how Text
- #who Text
- #where Text
- #when Instant})
+ (Record
+ [#what a
+ #why Text
+ #how Text
+ #who Text
+ #where Text
+ #when Instant]))
(type: .public Range
(Interval Instant))
@@ -47,5 +48,6 @@
(can_read Range (! (Try (List (Entry a))))))
(type: .public (Journal ! a)
- {#can_write (Can_Write ! a)
- #can_read (Can_Read ! a)})
+ (Record
+ [#can_write (Can_Write ! a)
+ #can_read (Can_Read ! a)]))
diff --git a/stdlib/source/library/lux/world/service/mail.lux b/stdlib/source/library/lux/world/service/mail.lux
index 063972b22..9a7384a71 100644
--- a/stdlib/source/library/lux/world/service/mail.lux
+++ b/stdlib/source/library/lux/world/service/mail.lux
@@ -15,5 +15,6 @@
(can_subscribe [address] (! (Try (Channel message)))))
(type: .public (Service ! address message)
- {#can_send (Can_Send ! address message)
- #can_subscribe (Can_Subscribe ! address message)})
+ (Record
+ [#can_send (Can_Send ! address message)
+ #can_subscribe (Can_Subscribe ! address message)]))