aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/source/lux/data/text.lux8
1 files changed, 5 insertions, 3 deletions
diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux
index 18ad49032..2cd6f7980 100644
--- a/stdlib/source/lux/data/text.lux
+++ b/stdlib/source/lux/data/text.lux
@@ -16,8 +16,10 @@
[compiler
["." host]]])
+(type: #export Char Nat)
+
(def: #export from-code
- (-> Nat Text)
+ (-> Char Text)
(|>> (:coerce Int) "lux int char"))
(do-template [<name> <code>]
@@ -37,7 +39,7 @@
("lux text size" x))
(def: #export (nth idx input)
- (-> Nat Text (Maybe Nat))
+ (-> Nat Text (Maybe Char))
(if (n/< ("lux text size" input) idx)
(#.Some ("lux text char" input idx))
#.None))
@@ -245,7 +247,7 @@
(def: #export (space? char)
{#.doc "Checks whether the character is white-space."}
- (-> Nat Bit)
+ (-> Char Bit)
(`` (case char
(^or (^ (char (~~ (static ..tab))))
(^ (char (~~ (static ..vertical-tab))))