GNU bug report logs -
#76485
[PATCH] gexp: ‘with-parameters’ properly handles ‘%graft?’.
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Sat, 22 Feb 2025 15:01:07 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #49 received at 76485 <at> debbugs.gnu.org (full text, mbox):
Hey David,
David Elsing <david.elsing <at> posteo.net> skribis:
> Ah yes, but I don't think a generic solution is needed at this point, as
> only the state monad is used in Guix. :)
> I also tried to find a general way to apply `with-fluids*' for monads in
> `mparameterize' and then noticed it might not make much sense.
Yeah, I agree.
>> The core of the problem here is that (guix monads), to a large extent,
>> addresses problems already addressed by other Scheme constructs such as
>> parameters/fluids, but in an incompatible way. So really,
>> ‘mparameterize’ and the many commits that fixed interactions between
>> ‘%current-system’ & co. and the monad are really band aid.
>
> I don't find the combination of the state monad and parameters so bad,
> and the idea of using the store monad to accumulate what to build is
> quite nice.
That’s right, glad you like it. :-)
Overall I think the initial motivation for having monads (the “store”
monad in particular) still makes sense. It’s the integration that
turned out to be clumsier than expected.
> To me the combination with prompts is a bit confusing though, it might
> be clearer to have continuations as part of the store monad.
I’m not sure. In a way, file-like objects achieve something similar to
the store monad, but in a more “Schemey” way. Likewise, Scheme has
delimited continuations, which is dynamic in nature; in other languages
one would use a monad for that but in Scheme it would be questionable as
it wouldn’t play well with other features (first of all by
“contaminating” non-monadic procedures).
> Oh, maybe you didn't see my previous patch where I specialized
> `mcall-with-parameters' and `mparameterize' to the state monad, I only
> sent it to Debbugs. I updated the patch and used your workaround for
> avoiding using `with-fluids*' by setting and later restoring the
> parameters.
I actually did see it but I was in a state of confusion. :-)
Thanks for your patience and for your work!
Ludo’.
This bug report was last modified 79 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.