aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang.lux')
-rw-r--r--new-luxc/source/luxc/lang.lux21
1 files changed, 6 insertions, 15 deletions
diff --git a/new-luxc/source/luxc/lang.lux b/new-luxc/source/luxc/lang.lux
index c4dff15ec..f02af30c5 100644
--- a/new-luxc/source/luxc/lang.lux
+++ b/new-luxc/source/luxc/lang.lux
@@ -1,17 +1,8 @@
(.module:
lux
- (lux (control [monad #+ do]
- ["ex" exception #+ exception:])
- (data [maybe]
- [product]
- ["e" error]
- [text "text/" Eq<Text>]
- text/format
- (coll [list]))
- [macro]
- (macro ["s" syntax #+ syntax:])
- (lang (type ["tc" check])))
- (luxc (lang ["la" analysis])))
+ (lux (data [maybe]
+ [text]
+ text/format)))
(def: (normalize-char char)
(-> Nat Text)
@@ -42,12 +33,12 @@
_
(text.from-code char)))
-(def: underflow Nat (n/dec +0))
+(def: underflow Nat (dec +0))
(def: #export (normalize-name name)
(-> Text Text)
- (loop [idx (n/dec (text.size name))
+ (loop [idx (dec (text.size name))
output ""]
(if (n/= underflow idx)
output
- (recur (n/dec idx) (format (|> (text.nth idx name) maybe.assume normalize-char) output)))))
+ (recur (dec idx) (format (|> (text.nth idx name) maybe.assume normalize-char) output)))))