emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58040: closed ("guix style" puts closing parentheses on the wrong li


From: GNU bug Tracking System
Subject: bug#58040: closed ("guix style" puts closing parentheses on the wrong line)
Date: Sun, 02 Oct 2022 22:13:02 +0000

Your message dated Mon, 03 Oct 2022 00:12:40 +0200
with message-id <871qrpan8n.fsf@gnu.org>
and subject line Re: bug#58040: "guix style" puts closing parentheses on the 
wrong line
has caused the debbugs.gnu.org bug report #58040,
regarding "guix style" puts closing parentheses on the wrong line
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
58040: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58040
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: "guix style" puts closing parentheses on the wrong line Date: Sat, 24 Sep 2022 12:18:32 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0
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.

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#58040: "guix style" puts closing parentheses on the wrong line Date: Mon, 03 Oct 2022 00:12:40 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
Hi,

Maxime Devos <maximedevos@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’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]