From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 3CB5BBB81 for ; Mon, 13 Dec 2004 09:37:24 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iBD8bNNk023462 for ; Mon, 13 Dec 2004 09:37:23 +0100 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 JAA21227 for ; Mon, 13 Dec 2004 09:37:22 +0100 (MET) Received: from mail.physik.uni-muenchen.de (mail.physik.uni-muenchen.de [192.54.42.129]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBD8bMNU030789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 13 Dec 2004 09:37:22 +0100 Received: from localhost (unknown [127.0.0.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 1E7FF20034; Mon, 13 Dec 2004 09:37:22 +0100 (CET) Received: from mail.physik.uni-muenchen.de ([127.0.0.1]) by localhost (mail.physik.uni-muenchen.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21870-01-29; Mon, 13 Dec 2004 09:37:20 +0100 (CET) Received: from mailhost.cip.physik.uni-muenchen.de (kaiser.cip.physik.uni-muenchen.de [141.84.136.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 687472002F; Mon, 13 Dec 2004 09:37:20 +0100 (CET) Received: from eiger.cip.physik.uni-muenchen.de (eiger.cip.physik.uni-muenchen.de [141.84.136.54]) by mailhost.cip.physik.uni-muenchen.de (Postfix) with ESMTP id 5403226E87; Mon, 13 Dec 2004 09:37:20 +0100 (CET) Received: by eiger.cip.physik.uni-muenchen.de (Postfix, from userid 3092) id 31E583CBC; Mon, 13 Dec 2004 09:37:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by eiger.cip.physik.uni-muenchen.de (Postfix) with ESMTP id 110892D686; Mon, 13 Dec 2004 09:37:19 +0100 (CET) Date: Mon, 13 Dec 2004 09:37:19 +0100 (CET) From: Thomas Fischbacher To: skaller Cc: Markus Mottl , Andrej Bauer , caml-list Subject: Re: [Caml-list] environment idiom In-Reply-To: <1102901206.2768.127.camel@pelican.wigram> Message-ID: References: <9410EC84C0872141B27A2726613EF45D02A52E08@psmrdcex01.psm.pin.safeco.com> <41B97FD7.50309@andrej.com> <1102732237.2611.580.camel@pelican.wigram> <41BB04D8.60405@andrej.com> <20041211181313.GA9656@fichte.ai.univie.ac.at> <1102809398.2611.637.camel@pelican.wigram> <1102901206.2768.127.camel@pelican.wigram> X-BOFH: Daemons did it MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at physik.uni-muenchen.de X-Miltered: at concorde with ID 41BD54C3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41BD54C2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 monadic:01 transformers:01 pointless:01 monadic:01 haskell:01 monads:01 haskell:01 semantics:01 cip:98 cip:98 lambda:01 lambda:01 idiom:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Mon, 13 Dec 2004, skaller wrote: > > > So monadic programming with state transformers is NOT > > > referentially transparent or purely functional at all. > > > > Actually, it is. :-) > > Actually it is pointless after I took the trouble > to explain why this is not the case, to make such > a bland statement. Then let me re-formulate it in other words: I think you do not yet fully appreciate the key point concerning the monadic approach. Or in still other words: could you please show me a piece of haskell code that uses monads but is not referentially transparent (assuming you do not use "unofficial" features such as, in particular, unsafePerformIO)? What I want to see in particular is a few lines of haskell, where X=Y holds, but the semantics of the program change if I substitute the definition of X with that of Y. -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)