From: Wojciech Meyer <wojciech.meyer@googlemail.com>
To: Chris Yocum <cyocum@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Monad Library?
Date: Fri, 23 Nov 2012 11:54:40 +0000 [thread overview]
Message-ID: <CAOg1smAyxJ4VnG2dBdsS8T3WRi70VoYirbjGLrf5q4pNbJb-1A@mail.gmail.com> (raw)
In-Reply-To: <20121123114328.GD31371@gmail.com>
On Fri, Nov 23, 2012 at 11:43 AM, Chris Yocum <cyocum@gmail.com> wrote:
> I was looking into using Monads in my programs but I am slightly at a
> loss as to what library is in general use. There is pa_monad but that
pa_monad is really useful and nice, I think the updated library is
available as pa_monad_custom OPAM package.
> seems to be a ocamlp4 exention and not a library. There is
> http://lambda.jimpryor.net/monad_library/ but that doesn't seem to be
> in opam or in godi so I am unsure as to its status.
>
> Does anyone have any suggestion for a well supported monad library for
> Ocaml?
First I would need to find an answer what do you mean by a monad library.
Monads is a general abstraction with a very simple interface. so they
don't require library as such.
However I agree it would be good to have some library that provides a
monadic interface to some common functionality found maybe in std
libraries, also some way of composing monads would be good having
monad transformers along. Batteries included offer monadic interface
to some common data types like list, bool, option.
You could look at Xavier Leroy's lectures here [1] to see the
excellent examples of using monads in OCaml.
For somewhat advanced type system trickery to use generic interface
for monads you can look at this excellent post [2].
-Wojciech
[1] http://gallium.inria.fr/~xleroy/mpri/progfunc/monads.2up.pdf
[2] http://alaska-kamtchatka.blogspot.co.uk/2011/09/higher-order-fun.html
[3] http://batteries.forge.ocamlcore.org/
next prev parent reply other threads:[~2012-11-23 11:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 11:43 Chris Yocum
2012-11-23 11:54 ` Wojciech Meyer [this message]
2012-11-23 12:05 ` Chris Yocum
2012-11-23 12:09 ` David House
2012-11-23 12:09 ` David House
2012-11-23 20:59 ` Michał Kurcewicz
2012-11-24 16:34 ` Chris Yocum
2012-11-24 16:54 ` Malcolm Matalka
2012-11-24 17:04 ` Chris Yocum
2012-11-24 18:34 ` Gabriel Scherer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOg1smAyxJ4VnG2dBdsS8T3WRi70VoYirbjGLrf5q4pNbJb-1A@mail.gmail.com \
--to=wojciech.meyer@googlemail.com \
--cc=caml-list@inria.fr \
--cc=cyocum@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox