GNU bug report logs - #58040
"guix style" puts closing parentheses on the wrong line

Previous Next

Package: guix;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Sat, 24 Sep 2022 10:19:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58040 in the body.
You can then email your comments to 58040 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#58040; Package guix. (Sat, 24 Sep 2022 10:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxime Devos <maximedevos <at> telenet.be>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 24 Sep 2022 10:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guix <bug-guix <at> gnu.org>
Subject: "guix style" puts closing parentheses on the wrong line
Date: Sat, 24 Sep 2022 12:18:32 +0200
[Message part 1 (text/plain, inline)]
Hi,

Putting the following definition into a file a.scm (from 
https://issues.guix.gnu.org/57460):

(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.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 02 Oct 2022 22:13:01 GMT) Full text and rfc822 format available.

Notification sent to Maxime Devos <maximedevos <at> telenet.be>:
bug acknowledged by developer. (Sun, 02 Oct 2022 22:13:02 GMT) Full text and rfc822 format available.

Message #10 received at 58040-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 58040-done <at> debbugs.gnu.org
Subject: Re: bug#58040: "guix style" puts closing parentheses on the wrong line
Date: Mon, 03 Oct 2022 00:12:40 +0200
Hi,

Maxime Devos <maximedevos <at> telenet.be> skribis:

> 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’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 31 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.