>From 78cbd6fd502b8e0b319c5e47969e8e7a3e5a6a3c Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Thu, 23 Feb 2023 14:58:32 -0500 Subject: [PATCH 3/8] Fix compiler warnings and errors. This enables compilation with Guile 2.2 and 3.0. * glean/client/components/repl-client-core.scm (solve): Add body to match statement. * glean/librarian/boot.scm (librarian-boot): Fix typo: %glean-package-name -> %glean-package-name%. * glean/library/core-templates.scm: Import "(glean library lexp)". * glean/library/server.scm (eval-provider): Fix typo: solutions -> solution. * glean/lounge/scorecards.scm: Import "(srfi srfi-43)". * tests/monads.scm (state-serialize): Add body to match statement. --- glean/client/components/repl-client-core.scm | 2 +- glean/librarian/boot.scm | 2 +- glean/library/core-templates.scm | 1 + glean/library/server.scm | 2 +- glean/lounge/scorecards.scm | 1 + tests/monads.scm | 3 ++- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/glean/client/components/repl-client-core.scm b/glean/client/components/repl-client-core.scm index f75ae9a..91a3a19 100644 --- a/glean/client/components/repl-client-core.scm +++ b/glean/client/components/repl-client-core.scm @@ -235,7 +235,7 @@ user. Then provide suggested next steps." (match (result rsp) ((#t "irrelevant") ; nothing to do - ) + #f) ((#t solution) (guide `("Correct! The answer is indeed '~a'.\n\n" ,solution))) ((#f solution) diff --git a/glean/librarian/boot.scm b/glean/librarian/boot.scm index f4aa3b6..581a87c 100644 --- a/glean/librarian/boot.scm +++ b/glean/librarian/boot.scm @@ -122,7 +122,7 @@ versions of the same discipline).")) (let ((opts (getopt-long args *option-grammar*))) (define (get-opt what) (option-ref opts what #f)) (cond ((get-opt 'version) - (emit-version %glean-package-name %glean-version%)) + (emit-version %glean-package-name% %glean-version%)) ((or (get-opt 'usage) (get-opt 'help)) (help)) (else diff --git a/glean/library/core-templates.scm b/glean/library/core-templates.scm index 661b54c..dfac0fe 100644 --- a/glean/library/core-templates.scm +++ b/glean/library/core-templates.scm @@ -45,6 +45,7 @@ #:use-module (glean common monads) #:use-module (glean common utils) #:use-module (glean library sets) + #:use-module (glean library lexp) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) diff --git a/glean/library/server.scm b/glean/library/server.scm index 3b957a5..6f8b299 100644 --- a/glean/library/server.scm +++ b/glean/library/server.scm @@ -158,7 +158,7 @@ in RQ after evaluating it against the answer provided in RQ, or raise (define (fetch-solution problem) (match (problem-s problem) ((? s? solution) (s-text solution)) - (((? s? solutions) ...) (s-text solution)) + (((? s? solution) ...) (s-text solution)) (#f "irrelevant"))) (match rq diff --git a/glean/lounge/scorecards.scm b/glean/lounge/scorecards.scm index d123c77..a5c179e 100644 --- a/glean/lounge/scorecards.scm +++ b/glean/lounge/scorecards.scm @@ -47,6 +47,7 @@ #:use-module (rnrs hashtables) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) + #:use-module (srfi srfi-43) #:export ( make-scorecard diff --git a/tests/monads.scm b/tests/monads.scm index 37f99a8..047882e 100644 --- a/tests/monads.scm +++ b/tests/monads.scm @@ -60,7 +60,8 @@ (('state ('token 6546) ('lounge "lng") ('library "lib") - ('format 'records)))))) + ('format 'records)) + #t)))) ;;;;; Tests for: state-unserialize -- 2.39.1