* Monads-Module for the Standard-OCaml-Distribution?!
@ 2005-05-11 10:08 Oliver Bandel
2005-05-11 14:14 ` [Caml-list] " Jacques Carette
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Bandel @ 2005-05-11 10:08 UTC (permalink / raw)
To: Inria Ocaml Mailing List
Hello,
monads are a natural part of the Haskell language.
As far as I know, in Ocaml it's possible to write
own Monads-Libraries and relatively easy. But
it is not part of the OCaml-distribution to have
such a library.
Why not adding a Monads-library to the standard distribution
of Ocaml? Wouldn't this a thing that the Ocaml-Core-developpers
and the INRIA would think of that it is a good thing?!
IMHO this would be nice for Haskell-used people (so to easier
switch to Ocaml) as well as it would be nice for Ocaml-users
to dive into this kind of functional I/O.
Regards,
Oliver Bandel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Monads-Module for the Standard-OCaml-Distribution?!
2005-05-11 10:08 Monads-Module for the Standard-OCaml-Distribution?! Oliver Bandel
@ 2005-05-11 14:14 ` Jacques Carette
0 siblings, 0 replies; 2+ messages in thread
From: Jacques Carette @ 2005-05-11 14:14 UTC (permalink / raw)
To: Oliver Bandel, Inria Ocaml Mailing List
I definitely support the inclusion of Monad-related features to Ocaml. However, without some syntactic sugar, this is
rather difficult to use.
I have discussed this in a previous message to this list [which unfortunately cannot be retrieved from the caml-list
archives because somehow multipart/MIME messages are not handled properly by the archiver]. However, it is archived
here:
https://mailman.rice.edu/pipermail/metaocaml-users-l/2005-March/000056.html
The camlp4 extension above has some flaws (as pointed out to me by Lydia van Dijk):
1) extra { } that are not needed
2) which monad is used is unclear
3) using multiple monads in the same program is difficult
Very helpfully, Lydia has provided me with an updated version of pa_monad.ml that fixes these. I unfortunately have
not had the time to convert all my monadic programs to this new notation - as a "real" test that the new notation does
work. As soon as I confirm this, I will send an email to caml-list with this improved notation.
Having a standard library of Monads that can easily be used with a monadic 'do' notation in Ocaml would definitely be
very nice.
Interestingly, here Ocaml can do something which cannot be done in Haskell: it is possible to use the object system to
encapsulate Monads in a novel way. Because objects are first-class in Ocaml, a lot more can be done with them than in
Haskell, where one must live within the confines of the typeclass system for manipulating Monads. While I have not
explored this enough, 'Monad Transformers' could become much easier to do in Ocaml than in Haskell!
Jacques
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-11 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-11 10:08 Monads-Module for the Standard-OCaml-Distribution?! Oliver Bandel
2005-05-11 14:14 ` [Caml-list] " Jacques Carette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox