Hi!

Josselin Poiret <d...@jpoiret.xyz> skribis:

> As an aside: is there anything preventing us from having do notation à
> la Haskell?  This could help bridge mlet and mbegin with >>=, which in
> its current form is impractical.  Here's what it could look like:
>
> (mdo %store-monad
>   (drv <- (gexp-derivation "myderivation" test-gexp))
>   (output <- (return (derivation->output-path drv)))
>   (built-derivations (list drv))
>   (return (format #t "~a~%" output)))

I guess we could do that, though it seems to me like a marginal
improvement over ‘mbegin’ and ‘mlet’.

Ludo’.

Reply via email to