some fixes oops

This commit is contained in:
rhiannon morris 2023-12-02 14:20:50 +01:00
parent f9acd13292
commit 87ec03ee5e
1 changed files with 2 additions and 6 deletions

View File

@ -217,8 +217,8 @@ def minus : =
case dup m return of { [m] ⇒
elim-pair (λ _ _ ⇒ )
0
(λ _ p ⇒ succ p)
(λ _ p ⇒ p)
(λ _ p ⇒ succ p)
(λ _ _ p ⇒ p)
m n
}
@ -311,17 +311,13 @@ namespace char {
λ x y ⇒ nat.le (ord x) (ord y)
def between : ω.Char → ω.Char → ω.Char → Bool =
λ lo hi c ⇒
case dup c return Bool of { [c] ⇒ bool.and (le lo c) (le c hi) }
λ lo hi c ⇒ bool.and (le lo c) (le c hi)
def is-digit : ω.Char → Bool =
between (chr 0x30) (chr 0x39)
def digit : Char → =
λ c ⇒ nat.minus (ord c) 0x30
#[compile-scheme "(lambda (c) (builtin-io (display c) (newline)))"]
postulate println : Char → IO Unit
}
def0 Char = char.Char