GNU bug report logs -
#49419
[PATCH 0/4] Essential home services
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
Andrew Tropin schreef op ma 05-07-2021 om 18:37 [+0300]:
> + (if (file-exists? (he-init-file new-home))
> + (let* ((port ((@@ (ice-9 popen) open-input-pipe)
> + (format #f "source ~a && env"
> + (he-init-file new-home))))
> + (result ((@@ (ice-9 rdelim) read-delimited) "" port))
> + (vars (map (lambda (x)
> + (let ((si (string-index x #\=)))
> + (cons (string-take x si)
> + (string-drop x (1+ si)))))
> + ((@@ (srfi srfi-1) remove)
> + string-null?
> + (string-split result #\newline)))))
Why are you using @@ here? 'open-input-pipe', 'read-delimited' and 'remove'
are exported variables, so you can just use @ instead of the magic evil @@
operator.
From the guile manual:
-- syntax: @ module-name binding-name
Refer to the binding named BINDING-NAME in module MODULE-NAME. The
binding must have been exported by the module.
-- syntax: @@ module-name binding-name
Refer to the binding named BINDING-NAME in module MODULE-NAME. The
binding must not have been exported by the module. This syntax is
only intended for debugging purposes or as a last resort. *Note
Declarative Modules::, for some limitations on the use of ‘@@’.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.