* bug#75997: (ice-9 match): warning: unused variable `failure'
@ 2025-02-01 20:08 Tomas Volf
0 siblings, 0 replies; only message in thread
From: Tomas Volf @ 2025-02-01 20:08 UTC (permalink / raw)
To: 75997
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]
Hi,
--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 match))
(match-lambda (_ #f))
--8<---------------cut here---------------end--------------->8---
This source code leads to a warning when compiled:
--8<---------------cut here---------------start------------->8---
$ guix shell guile-next -- guild compile -W3 -o /tmp/xx.go /tmp/xx.scm
/tmp/xx.scm:3:0: warning: unused variable `failure'
wrote `/tmp/xx.go'
--8<---------------cut here---------------end--------------->8---
Looking at the expansion
--8<---------------cut here---------------start------------->8---
(lambda (expr)
(let* ((v expr)
(failure
(lambda ()
((@@ (ice-9 match) throw)
'match-error
"match"
"no matching pattern"
v)
#f)))
#f))
--8<---------------cut here---------------end--------------->8---
the `failure' is indeed unused. I took a look at the source code but it
is bit beyond my current abilities, so I am not sure how to fix it.
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-01 20:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-01 20:08 bug#75997: (ice-9 match): warning: unused variable `failure' Tomas Volf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).