From bcd3d9ee8f6797f758a2abea98d5cb6a74cc7df0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 15 Jun 2018 00:11:33 -0400 Subject: - WIP: Adjustments to new-luxc based on recent changes to stdlib. --- new-luxc/source/luxc/lang.lux | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'new-luxc/source/luxc/lang.lux') 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/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))))) -- cgit v1.2.3