diff options
author | Eduardo Julian | 2018-07-30 18:17:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-30 18:17:01 -0400 |
commit | 4edf1f78132715124910ac8b8fc20e4da7072f15 (patch) | |
tree | 5cc731d4db39e1a7bb567f03f4bc8ef1db8a6261 /stdlib/source | |
parent | a59fc865aee240afe21b82ffef2681bb9a6ea693 (diff) |
Updating new-luxc to latest Lux changes [Part 0].
Diffstat (limited to 'stdlib/source')
-rw-r--r-- | stdlib/source/lux/compiler/default/phase/translation.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/data/text/unicode.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/math/random.lux | 11 |
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> |