aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/compiler/default/phase/translation.lux2
-rw-r--r--stdlib/source/lux/data/text/unicode.lux4
-rw-r--r--stdlib/source/lux/math/random.lux11
3 files changed, 13 insertions, 4 deletions
diff --git a/stdlib/source/lux/compiler/default/phase/translation.lux b/stdlib/source/lux/compiler/default/phase/translation.lux
index 321573767..e79645e63 100644
--- a/stdlib/source/lux/compiler/default/phase/translation.lux
+++ b/stdlib/source/lux/compiler/default/phase/translation.lux
@@ -86,7 +86,7 @@
(type: #export (Bundle anchor expression statement)
(extension.Bundle (State anchor expression statement) Synthesis expression))
-(def: #export (init host)
+(def: #export (state host)
(All [anchor expression statement]
(-> (Host expression statement)
(..State anchor expression statement)))
diff --git a/stdlib/source/lux/data/text/unicode.lux b/stdlib/source/lux/data/text/unicode.lux
index 011af390e..ebd54c02b 100644
--- a/stdlib/source/lux/data/text/unicode.lux
+++ b/stdlib/source/lux/data/text/unicode.lux
@@ -341,3 +341,7 @@
(def: #export full
Set
(finger.branch (set half/0) (set half/1)))
+
+(def: #export ascii
+ Set
+ (set (list basic-latin)))
diff --git a/stdlib/source/lux/math/random.lux b/stdlib/source/lux/math/random.lux
index fdbf202cf..e441fc0f2 100644
--- a/stdlib/source/lux/math/random.lux
+++ b/stdlib/source/lux/math/random.lux
@@ -138,9 +138,14 @@
xs (text char-gen (dec size))]
(wrap (text/compose (text.from-code x) xs)))))
-(def: #export unicode
- (-> Nat (Random Text))
- (text (char unicode.full)))
+(do-template [<name> <set>]
+ [(def: #export <name>
+ (-> Nat (Random Text))
+ (text (char <set>)))]
+
+ [unicode unicode.full]
+ [ascii unicode.ascii]
+ )
(do-template [<name> <type> <ctor> <gen>]
[(def: #export <name>