aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/source/lux.lux38
-rw-r--r--stdlib/source/lux/world/file.lux5
2 files changed, 25 insertions, 18 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index 17eb44933..99cefa854 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -717,6 +717,7 @@
## #expected (Maybe Type)
## #seed Nat
## #scope-type-vars (List Nat)
+## #extensions Void
## #host Void})
("lux def" Compiler
(#Named ["lux" "Compiler"]
@@ -740,8 +741,10 @@
Nat
(#Product ## scope-type-vars
(#Apply Nat List)
- ## "lux.host"
- Void)))))))))))
+ (#Product ## extensions
+ Void
+ ## "lux.host"
+ Void))))))))))))
(record$ (#Cons [(tag$ ["lux" "tags"])
(tuple$ (#Cons (text$ "info")
(#Cons (text$ "source")
@@ -753,8 +756,9 @@
(#Cons (text$ "expected")
(#Cons (text$ "seed")
(#Cons (text$ "scope-type-vars")
- (#Cons (text$ "host")
- #Nil))))))))))))]
+ (#Cons (text$ "extensions")
+ (#Cons (text$ "host")
+ #Nil)))))))))))))]
(#Cons [(tag$ ["lux" "doc"])
(text$ "Represents the state of the Lux compiler during a run.
@@ -1808,7 +1812,7 @@
(let' [[module name] ident
{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars} state]
("lux case" (get module modules)
{(#Some {#module-hash _ #module-aliases _ #definitions definitions #imports _ #tags tags #types types #module-annotations _ #module-state _})
@@ -1984,7 +1988,7 @@
("lux case" state
{{#info info #source source #current-module current-module #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars}
("lux case" current-module
{(#Some module-name)
@@ -2466,7 +2470,7 @@
{{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
#seed seed #expected expected
- #cursor cursor
+ #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars}
(#Right state (find-macro' modules current-module module name))})))))
@@ -2730,12 +2734,12 @@
{{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
#seed seed #expected expected
- #cursor cursor
+ #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars}
(#Right {#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
#seed (n/+ +1 seed) #expected expected
- #cursor cursor
+ #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars}
(symbol$ ["" ($_ text/compose "__gensym__" prefix (nat/encode seed))]))}))
@@ -3575,7 +3579,7 @@
(function [state]
(let [{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars} state]
(case (get name modules)
(#Some module)
@@ -3638,7 +3642,7 @@
(function [state]
(let [{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars} state]
(case expected
(#Some type)
@@ -4165,7 +4169,7 @@
(let [modules (case state
{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars}
modules)]
(case (get module modules)
@@ -4219,7 +4223,7 @@
(case state
{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars}
(find (: (-> Scope (Maybe Type))
(function [env]
@@ -4242,7 +4246,7 @@
(let [[v-prefix v-name] name
{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars} state]
(case (get v-prefix modules)
#None
@@ -4261,7 +4265,7 @@
(let [[v-prefix v-name] name
{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars} state]
(case (get v-prefix modules)
#None
@@ -4314,7 +4318,7 @@
(#Right [compiler (#Var type-id)])
(let [{#info _ #source _ #current-module _ #modules _
#scopes _ #type-context type-context #host _
- #seed _ #expected _ #cursor _
+ #seed _ #expected _ #cursor _ #extensions extensions
#scope-type-vars _} compiler
{#ex-counter _ #var-counter _ #var-bindings var-bindings} type-context]
(case (find-type-var type-id var-bindings)
@@ -5639,7 +5643,7 @@
(case state
{#info info #source source #current-module _ #modules modules
#scopes scopes #type-context types #host host
- #seed seed #expected expected #cursor cursor
+ #seed seed #expected expected #cursor cursor #extensions extensions
#scope-type-vars scope-type-vars}
(#Right state scope-type-vars)
))
diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux
index b33cf9540..1c295da08 100644
--- a/stdlib/source/lux/world/file.lux
+++ b/stdlib/source/lux/world/file.lux
@@ -29,7 +29,8 @@
(setLastModified [long] #io #try boolean)
(canRead [] #io #try boolean)
(canWrite [] #io #try boolean)
- (canExecute [] #io #try boolean))
+ (canExecute [] #io #try boolean)
+ (#static separator String))
(host.import java/lang/AutoCloseable
(close [] #io #try void))
@@ -116,3 +117,5 @@
(-> i.Instant File (Process Bool))
(java/io/File::setLastModified [(|> time i.relative d.to-millis)]
(java/io/File::new file)))
+
+(def: #export separator Text java/io/File::separator)