From 4edf1f78132715124910ac8b8fc20e4da7072f15 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 30 Jul 2018 18:17:01 -0400 Subject: Updating new-luxc to latest Lux changes [Part 0]. --- stdlib/source/lux/compiler/default/phase/translation.lux | 2 +- stdlib/source/lux/data/text/unicode.lux | 4 ++++ stdlib/source/lux/math/random.lux | 11 ++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'stdlib/source') 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 [ ] + [(def: #export + (-> Nat (Random Text)) + (text (char )))] + + [unicode unicode.full] + [ascii unicode.ascii] + ) (do-template [ ] [(def: #export -- cgit v1.2.3