"guix style" puts closing parentheses on the wrong line

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal

Debbugs page

Maxime Devos wrote 2 years ago
(name . bug-guix)(address . bug-guix@gnu.org)
71826703-ee1d-b353-7b3f-f5a5d37c3125@telenet.be
Hi,
Putting the following definition into a file a.scm (from
(define (find-latest-release releases)
(fold (match-lambda*
(((key . value) result)
(cond ((even-minor-version? key)
(match result
(#f
(cons key value))
((newest . _)
(if (version>? key newest)
(cons key value)
result))))
(else
result))))
#f
releases))
and running "guix style -f a.scm" on it, it becomes
(define (find-latest-release releases)
(fold (match-lambda* (((key . value) result)
(cond
((even-minor-version? key)
(match result
(#f (cons key value))
((newest . _) (if (version>? key newest)
(cons key value) result))))
(else result)))
) #f releases)).
In particular, note the ") #f releases" -- IMO ) should be on the
previous line, after (else result))), to avoid lonely parentheses and to
align the arguments of 'fold'.
Greetings,
Maxime.
Attachment: OpenPGP_signature
Ludovic Courtès wrote 2 years ago
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 58040-done@debbugs.gnu.org)
871qrpan8n.fsf@gnu.org
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (17 lines)
> and running "guix style -f a.scm" on it, it becomes
>
> (define (find-latest-release releases)
> (fold (match-lambda* (((key . value) result)
> (cond
> ((even-minor-version? key)
> (match result
> (#f (cons key value))
> ((newest . _) (if (version>? key newest)
> (cons key value) result))))
> (else result)))
> ) #f releases)).
>
> In particular, note the ") #f releases" -- IMO ) should be on the
> previous line, after (else result))), to avoid lonely parentheses and
> to align the arguments of 'fold'.

Fixed in 4bd75d79e5ad8bb0f6cdcc0d15b9afb25f54afbd: ‘match-lambda*’ had
an incorrect special form declaration.

Thanks,
Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58040@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58040
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help