From f756ff02df172cd24ab09e70ad31e14fef6ce135 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 14 Sep 2017 11:44:01 +0100 Subject: [PATCH] [functional tests] Fix bug in return type of parser-combinators/eof --- functional-tests/parser-combinators.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functional-tests/parser-combinators.scm b/functional-tests/parser-combinators.scm index 8dfb10f..01b554f 100644 --- a/functional-tests/parser-combinators.scm +++ b/functional-tests/parser-combinators.scm @@ -322,10 +322,11 @@ (>> (lit str) (pure sym))) |# - (define (eof s) - (if (zero? (string-length s)) - (values #t #t "") - (error-m (dsp "eof expected no input (but there was)")))) + (define eof + (lambda (st) + (if (zero? (string-length (st-input st))) + (values #t st) + (error-m (dsp "eof expected no input (but there was)"))))) ;;---------------------------------------------------------------- ;; Imperative notation for when the combinators are cumbersome