[Top][All Lists]

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

[bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'.

From: Ludovic Courtès
Subject: [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'.
Date: Wed, 24 Jul 2019 00:30:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)


address@hidden (Jakob L. Kreuze) skribis:

> +(define (local-eval exp)
> +  "Evaluate EXP, a G-Expression, in-place."
> +  (mlet* %store-monad ((lowered (lower-gexp exp))
> +                       (_ (built-derivations (map gexp-input-thing
> +                                                  (lowered-gexp-inputs 
> lowered)))))

Note that on current master this should be:

  (built-derivations (lowered-gexp-inputs lowered))

> +    (save-load-path-excursion
> +     (set! %load-path (lowered-gexp-load-path lowered))
> +     (set! %load-compiled-path (lowered-gexp-load-compiled-path lowered))
> +     (return
> +      (guard (c ((message-condition? c)
> +                 (leave (G_ "failed to install bootloader:~%~a~%")
> +                        (condition-message c))))
> +        (primitive-eval (lowered-gexp-sexp lowered)))))))

My last grief for this patch series is exception handling above: it’s
not good to report “failed to install bootloader” whatever the problem
is.  :-)

Could we somehow move exception handling at the call sites?  I know that
monadic style makes it harder.

The rest looks great, and congrats for being the first one to
reconfigure with it!  :-)


reply via email to

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