Hi from Munich!

I committed yesterday the (guix monad-repl) module, which adds
meta-commands to the Guile REPL (which I needed for demos of my talk.)
Quoth the manual:

--8<---------------cut here---------------start------------->8---
   Note that the ‘(guix monad-repl)’ module extends Guile’s REPL with
new “meta-commands” to make it easier to deal with monadic procedures:
‘run-in-store’, and ‘enter-store-monad’.  The former, is used to “run” a
single monadic value through the store:

     scheme@(guile-user)> ,run-in-store (package->derivation hello)
     $1 = #<derivation /gnu/store/…-hello-2.9.drv => …>

   The latter enters a recursive REPL, where all the return values are
automatically run through the store:

     scheme@(guile-user)> ,enter-store-monad
     store-monad@(guile-user) [1]> (package->derivation hello)
     $2 = #<derivation /gnu/store/…-hello-2.9.drv => …>
     store-monad@(guile-user) [1]> (text-file "foo" "Hello!")
     $3 = "/gnu/store/…-foo"
     store-monad@(guile-user) [1]> ,q
     scheme@(guile-user)>

Note that non-monadic values cannot be returned in the ‘store-monad’
REPL.
--8<---------------cut here---------------end--------------->8---

Feedback welcome!

Ludo’.

Reply via email to