From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 1AB5F7F1DA for ; Fri, 23 Nov 2012 12:55:01 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of wojciech.meyer@googlemail.com) identity=pra; client-ip=209.85.217.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of wojciech.meyer@googlemail.com designates 209.85.217.182 as permitted sender) identity=mailfrom; client-ip=209.85.217.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f182.google.com) identity=helo; client-ip=209.85.217.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="postmaster@mail-lb0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnABAMtjr1DRVdm2mGdsb2JhbABEFsAXCBYOAQEBAQEICQ0HFCeCHgEBAwEBQAE4AQMBCwYFCwMKLiEBEgEFARwGE4d6AQMJBgygPY8rhFQKQA2JTgEFDItCaQWEPAOST4FdgVWBHIoWgzAWKYQQ X-IronPort-AV: E=Sophos;i="4.83,307,1352070000"; d="scan'208";a="163557731" Received: from mail-lb0-f182.google.com ([209.85.217.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Nov 2012 12:54:41 +0100 Received: by mail-lb0-f182.google.com with SMTP id go10so8352278lbb.27 for ; Fri, 23 Nov 2012 03:54:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/X6bU/fVlVg4grUW4VLufuGHkSlJasnbdpWdCM2h2M0=; b=sivKQFG1XTB8LwNSvkNi4Mq+Hisc5lQsjJPtCUIUQhnoBXwW5xsaSqQYG1FGsxU6xv Z9qHE8NUf6EjkTTJyIDFnTNTfAMuirYazkWYCv4EEjiSlgxjjFUer26SNNsvrPNfT2uf ML/PrNyf+CjbBYigZSRXVKkJQ7R87PruryirojQmmo87Zz+YY5+3+T8IZe6TpjYwvw3t sMRw3/53nykwKR6YyRgKxH1Kq4tyiRDhju9jMNlu2HPSxieTPI0QwJTMyfffxeInkWyl Vmk8e3hNwarwiWH5is1H2tvnA0GdZX/ih+seKM9W0Ib6Y3AF1J9MIJ41K0lTbao8ukvL auFw== MIME-Version: 1.0 Received: by 10.152.104.50 with SMTP id gb18mr3353195lab.9.1353671680677; Fri, 23 Nov 2012 03:54:40 -0800 (PST) Received: by 10.114.15.41 with HTTP; Fri, 23 Nov 2012 03:54:40 -0800 (PST) In-Reply-To: <20121123114328.GD31371@gmail.com> References: <20121123114328.GD31371@gmail.com> Date: Fri, 23 Nov 2012 11:54:40 +0000 Message-ID: From: Wojciech Meyer To: Chris Yocum Cc: Caml List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Monad Library? On Fri, Nov 23, 2012 at 11:43 AM, Chris Yocum 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/