From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA23980; Wed, 12 Mar 2003 17:58:23 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA24189 for caml-list@pauillac.inria.fr; Wed, 12 Mar 2003 17:58:22 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA19657 for ; Wed, 12 Mar 2003 15:46:42 +0100 (MET) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2CEkfX22529 for ; Wed, 12 Mar 2003 15:46:41 +0100 (MET) Received: from univ-savoie.fr (grenoble-1-a7-62-147-75-158.dial.proxad.net [62.147.75.158]) by postfix3-1.free.fr (Postfix) with ESMTP id ADAA2C178; Wed, 12 Mar 2003 15:46:39 +0100 (CET) Message-ID: <3E6F9C9B.2060203@univ-savoie.fr> Date: Wed, 12 Mar 2003 15:46:19 -0500 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: mgushee@havenrock.com, caml-list Subject: [Caml-list] Monads was OCaml popularity References: <005d01c2e76f$92d0f8b0$2713f9ca@WARP> <3E6DDAFC.19000.44771B6@localhost> X-Enigmail-Version: 0.65.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig86C805F4803A2D1DFE996945" X-Spam: no; 0.00; raffalli:01 univ-savoie:01 monads:01 openpgp:01 2440:01 3156:01 haskell:01 introductory:99 insists:01 monad:01 morphism:01 enforces:01 lama:01 savoie:01 chablais:01 X-Attachments: type="application/pgp-signature" X-Spam: no; 0.00; raffalli:01 univ-savoie:01 monads:01 openpgp:01 2440:01 3156:01 haskell:01 introductory:99 insists:01 monad:01 morphism:01 enforces:01 lama:01 savoie:01 chablais:01 X-Attachments: type="application/pgp-signature" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig86C805F4803A2D1DFE996945 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit > My other big problem with Haskell was ... you guessed it: monads! I > must have read every introduction to monads that's available on line > (and there are at least half a dozen), but I still don't really > understand them. Without monads, you can't do any real work in > Haskell, and monads are universally acknowledged to be a difficult > concept. Yet every introductory text I have seen on Haskell insists > that you learn the theory of monads before you can learn how to do > things like I/O. > Maybe if people where calling monads by their real name: quasi-morphism :-) that would be better ! - A monad M is given by a mapping M from type to type, a function apply : M (a -> b) -> M a -> M b and a function unit : a -> M a such that unit (f a) = apply (unit f) (unit a) - A real morphism M would be given by a mapping M from type to type, a function unit : a -> M a such that unit (f a) = (unit f) (unit a) But this to be true enforces M (a -> b) = M a -> Mb otherwise the previous equation makes no sense. So monads introduces apply to be less restrictive : the equation M (a -> b) = M a -> M b is replaced by a function apply : M (a -> b) -> M a -> Mb But when you see that, it is like morphism in math. There are very few result true for a morphism/monads, and when you use a specific monad, you may/have better to forget that this is a monad (do you really need to know that x |-> exp x is a group morphisme to use it even if this is an important remark ?) PS: the bindlib library for data-types with bound variables is a monad -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- --------------enig86C805F4803A2D1DFE996945 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+b5yjSQDyWB/+xBwRAsJZAKCEXrBBVZ5G3XZMnRvaN/1PN+VPIwCfTay5 gTNQQqDyPhlYy3hO3KWQT6U= =wgov -----END PGP SIGNATURE----- --------------enig86C805F4803A2D1DFE996945-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners