guix-devel
[Top][All Lists]
Advanced

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

Re: Struggling to write Dissecting Guix, Part 2


From: Wojtek Kosior
Subject: Re: Struggling to write Dissecting Guix, Part 2
Date: Wed, 25 Jan 2023 16:54:45 +0100

Hi, Paren!

>   - Guile has no type system, so you can't express monads in terms of types

While Guile is dynamically typed, functions we define in it generally
do expect their arguments to be of certain types. And they also
generally guarantee their return values to be of certain types. So even
though there's no static type checking, it is still possible (and often
practical) to treat the functions as being typed.

Btw, I really like the explanation of a monad as function taking World
as one of its arguments and producing a modified World. Although you
probably already have your own favorite sources on the topic, here[1] is
the paper (written by someone at Microsoft, lol) where I found this
approach.

Happy dissecting,
Wojtek

[1] https://www.cs.tufts.edu/comp/150PLD/Papers/awkward.pdf


-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

♥ R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷ c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ==
✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ== | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8=
-- (sig_end)


On Wed, 25 Jan 2023 07:12:45 +0000
"(" <paren@disroot.org> wrote:

> Hello Guix,
> 
> I've been struggling to write Part 2 of Dissecting Guix; I'm just not sure 
> where to start to
> explain monads.
> 
> It's hard for a variety of reasons, those being that:
> 
>   - Guile has no type system, so you can't express monads in terms of types
>   - Guix doesn't implement very many monads (only state, identity, and 
> store), so it's
>     difficult to explain with a simpler monad, as there are no simpler monads
>   - Guix doesn't have functors or monoids either, so it's hard to 
> "progressively" explain
>     first functors, then monoids, then monads
>   - Monads are just difficult in general :P
> 
> Any suggestions? :/
> 
>     -- (


Attachment: pgpMItncvIwLs.pgp
Description: OpenPGP digital signature


reply via email to

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