From ed384342fd1bea526d1f8862f683c2b3542456ae Mon Sep 17 00:00:00 2001 From: Monty Anderson Date: Sun, 19 May 2024 21:12:13 +0100 Subject: [PATCH 1/2] `ac.rkt`: handle `trash-whitespace` errors --- ac.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ac.rkt b/ac.rkt index 3cf56da2..a1125ff8 100644 --- a/ac.rkt +++ b/ac.rkt @@ -1446,9 +1446,10 @@ Arc 3.2 documentation: https://arclanguage.github.io/ref. (define (trash-whitespace) - (when (and (char-ready?) (char-whitespace? (peek-char))) - (read-char) - (trash-whitespace))) + (with-handlers ([exn:fail:contract? (lambda (exn) (void))]) + (when (and (char-ready?) (char-whitespace? (peek-char))) + (read-char) + (trash-whitespace)))) (define (tl2 interactive?) (when interactive? (display "arc> ")) From dc93a7c9a389174f14ac17bb06079d8ee41652ab Mon Sep 17 00:00:00 2001 From: Monty Anderson Date: Mon, 20 May 2024 11:01:22 +0100 Subject: [PATCH 2/2] `ac.rkt`: fix whitespace --- ac.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ac.rkt b/ac.rkt index a1125ff8..f44c8a7d 100644 --- a/ac.rkt +++ b/ac.rkt @@ -1449,7 +1449,7 @@ Arc 3.2 documentation: https://arclanguage.github.io/ref. (with-handlers ([exn:fail:contract? (lambda (exn) (void))]) (when (and (char-ready?) (char-whitespace? (peek-char))) (read-char) - (trash-whitespace)))) + (trash-whitespace)))) (define (tl2 interactive?) (when interactive? (display "arc> "))