aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/text.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/text.lux')
-rw-r--r--stdlib/source/lux/data/text.lux46
1 files changed, 23 insertions, 23 deletions
diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux
index 835d55fd1..e8eb20b43 100644
--- a/stdlib/source/lux/data/text.lux
+++ b/stdlib/source/lux/data/text.lux
@@ -12,29 +12,29 @@
## [Functions]
(def: #export (size x)
(-> Text Nat)
- [(_lux_proc ["text" "size"] [x])])
+ ("lux text size" x))
(def: #export (nth idx input)
(-> Nat Text (Maybe Nat))
- (_lux_proc ["text" "char"] [input idx]))
+ ("lux text char" input idx))
(def: #export (contains? sub text)
(-> Text Text Bool)
- (_lux_proc ["text" "contains?"] [text sub]))
+ ("lux text contains?" text sub))
(do-template [<name> <proc>]
[(def: #export (<name> input)
(-> Text Text)
- (_lux_proc ["text" <proc>] [input]))]
+ (<proc> input))]
- [lower-case "lower-case"]
- [upper-case "upper-case"]
- [trim "trim"]
+ [lower-case "lux text lower-case"]
+ [upper-case "lux text upper-case"]
+ [trim "lux text trim"]
)
(def: #export (clip from to input)
(-> Nat Nat Text (Maybe Text))
- (_lux_proc ["text" "clip"] [input from to]))
+ ("lux text clip" input from to))
(def: #export (clip' from input)
(-> Nat Text (Maybe Text))
@@ -42,19 +42,19 @@
(def: #export (replace-all pattern value template)
(-> Text Text Text Text)
- (_lux_proc ["text" "replace-all"] [template pattern value]))
+ ("lux text replace-all" template pattern value))
(do-template [<general> <common> <proc> <start>]
[(def: #export (<common> pattern input)
(-> Text Text (Maybe Nat))
- (_lux_proc ["text" <proc>] [input pattern <start>]))
+ (<proc> input pattern <start>))
(def: #export (<general> pattern from input)
(-> Text Nat Text (Maybe Nat))
- (_lux_proc ["text" <proc>] [input pattern from]))]
+ (<proc> input pattern from))]
- [index-of index-of' "index" +0]
- [last-index-of last-index-of' "last-index" (size input)]
+ [index-of index-of' "lux text index" +0]
+ [last-index-of last-index-of' "lux text last-index" (size input)]
)
(def: #export (starts-with? prefix x)
@@ -108,30 +108,30 @@
## [Structures]
(struct: #export _ (Eq Text)
(def: (= test subject)
- (_lux_proc ["text" "="] [subject test])))
+ ("lux text =" subject test)))
(struct: #export _ (order;Order Text)
(def: eq Eq<Text>)
(def: (< test subject)
- (_lux_proc ["text" "<"] [subject test]))
+ ("lux text <" subject test))
(def: (<= test subject)
- (or (_lux_proc ["text" "<"] [subject test])
- (_lux_proc ["text" "="] [subject test])))
+ (or ("lux text <" subject test)
+ ("lux text =" subject test)))
(def: (> test subject)
- (_lux_proc ["text" "<"] [test subject]))
+ ("lux text <" test subject))
(def: (>= test subject)
- (or (_lux_proc ["text" "<"] [test subject])
- (_lux_proc ["text" "="] [test subject])))
+ (or ("lux text <" test subject)
+ ("lux text =" test subject)))
)
(struct: #export _ (Monoid Text)
(def: identity "")
(def: (compose left right)
- (_lux_proc ["text" "append"] [left right])))
+ ("lux text append" left right)))
(open Monoid<Text> "text/")
@@ -153,7 +153,7 @@
(def: eq Eq<Text>)
(def: (hash input)
- (_lux_proc ["text" "hash"] [input])))
+ ("lux text hash" input)))
(def: #export concat
(-> (List Text) Text)
@@ -192,7 +192,7 @@
(def: #export (from-code code)
(-> Nat Text)
- (_lux_proc ["nat" "to-char"] [code]))
+ ("lux nat to-char" code))
(def: #export (space? char)
{#;doc "Checks whether the character is white-space."}