diff options
Diffstat (limited to 'stdlib/source/program')
-rw-r--r-- | stdlib/source/program/licentia/input.lux | 3 | ||||
-rw-r--r-- | stdlib/source/program/licentia/license/notice.lux | 4 | ||||
-rw-r--r-- | stdlib/source/program/scriptum.lux | 22 |
3 files changed, 17 insertions, 12 deletions
diff --git a/stdlib/source/program/licentia/input.lux b/stdlib/source/program/licentia/input.lux index 0fb4b5f84..7d2192fe1 100644 --- a/stdlib/source/program/licentia/input.lux +++ b/stdlib/source/program/licentia/input.lux @@ -10,6 +10,7 @@ [format ["." json (#+ Reader)]] [number + ["n" nat] ["i" int] ["f" frac]]]] [// @@ -63,7 +64,7 @@ #let [period {#time.start start #time.end end}] _ (parser.assert (ex.construct invalid-period period) - (n/<= end start))] + (n.<= end start))] (wrap period)))) (def: copyright-holder diff --git a/stdlib/source/program/licentia/license/notice.lux b/stdlib/source/program/licentia/license/notice.lux index 947669035..d4df7d166 100644 --- a/stdlib/source/program/licentia/license/notice.lux +++ b/stdlib/source/program/licentia/license/notice.lux @@ -1,6 +1,8 @@ (.module: [lux #* [data + [number + ["n" nat]] ["." text ["%" format (#+ format)]] [collection @@ -18,7 +20,7 @@ (def: #export (copyright-holder holder) (-> //copyright.Holder Text) (let [(^slots [#//time.start #//time.end]) (get@ #//copyright.period holder) - single-year? (n/= start end) + single-year? (n.= start end) period-section (if single-year? (%.nat start) (format (%.nat start) "-" (%.nat end)))] diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index 3775fd006..f44abef88 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -12,6 +12,8 @@ [data ["." maybe] ["." product] + [number + ["n" nat]] [format ["md" markdown (#+ Markdown Span Block)]] ["." text ("#;." equivalence) @@ -40,8 +42,8 @@ (text.from-code char) #.None - (format (parameter-type-name (n// name-options-count id)) - (parameter-type-name (n/% name-options-count id))))) + (format (parameter-type-name (n./ name-options-count id)) + (parameter-type-name (n.% name-options-count id))))) (def: type-var-names (Sequence Text) @@ -52,13 +54,13 @@ (-> Nat Bit) (<partition> id))] - [type-func? n/even?] - [type-arg? n/odd?] + [type-func? n.even?] + [type-arg? n.odd?] ) (def: (arg-id level id) (-> Nat Nat Nat) - (n/- (n// 2 id) level)) + (n.- (n./ 2 id) level)) (def: (parameter->name [type-func-name type-function-arguments] level id) (-> [Text (List Text)] Nat Nat Text) @@ -77,12 +79,12 @@ (def: (level->args offset level) (-> Nat Nat (List Text)) - (if (n/= 0 level) + (if (n.= 0 level) (list) (|> level dec (list.n/range 0) - (list;map (|>> (n/+ (inc offset)) parameter-type-name))))) + (list;map (|>> (n.+ (inc offset)) parameter-type-name))))) (def: (prefix-lines prefix lines) (-> Text Text Text) @@ -174,7 +176,7 @@ [_ (<tag> _)] (let [[level' body] (<flatten> type) args (level->args level level') - body-doc (pprint-type-definition (n/+ level level') type-func-info tags module signature? recursive-type? body)] + body-doc (pprint-type-definition (n.+ level level') type-func-info tags module signature? recursive-type? body)] (format "(" <name> " " "[" (text.join-with " " args) "]" (case tags #.Nil @@ -239,7 +241,7 @@ (<tag> _) (let [[level' body] (<flatten> type) args (level->args level level') - body-doc (pprint-type (n/+ level level') type-func-name module body)] + body-doc (pprint-type (n.+ level level') type-func-name module body)] (format "(" <name> " " "[" (|> args (list.interpose " ") (text.join-with "")) "]" (format " " body-doc) ")"))) @@ -318,7 +320,7 @@ (def: (unravel-type-func level type) (-> Nat Type Type) - (if (n/> 0 level) + (if (n.> 0 level) (case type (#.UnivQ _env _type) (unravel-type-func (dec level) _type) |