Re: [Haskell-cafe] Re: A free monad theorem?

2006-09-03 Thread Tomasz Zielonka
On Sun, Sep 03, 2006 at 01:23:13AM +0200, [EMAIL PROTECTED] wrote: Tomasz Zielonka: Programmers define the = method for their monads because they want to use it to bind computations. They know how to pass result(s) from one computation in their Monad to another, and they put this algorithm

[Haskell-cafe] Re: A free monad theorem?

2006-09-02 Thread Benjamin Franksen
Hello All, many thanks for all the interesting answers. I think I have enough now to think about for a while. Cheers, Ben ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: A free monad theorem?

2006-09-02 Thread jerzy . karczmarczuk
Tomasz Zielonka: Programmers define the = method for their monads because they want to use it to bind computations. They know how to pass result(s) from one computation in their Monad to another, and they put this algorithm in the implementation of =. If they didn't care about passing results

Re: [Haskell-cafe] Re: A free monad theorem?

2006-09-01 Thread Andrea Rossato
Il Fri, Sep 01, 2006 at 07:22:02AM +0200, Tomasz Zielonka ebbe a scrivere: On Fri, Sep 01, 2006 at 01:13:14AM +0200, Benjamin Franksen wrote: So getting the value out of the monad is not a pure function (extract :: Monad m = m a - a). I think I stated that, already, in my previous post.

Re: [Haskell-cafe] Re: A free monad theorem?

2006-09-01 Thread Brian Hulley
Benjamin Franksen wrote: Tomasz Zielonka wrote: whatever you do, you won't be able to extract an 'a' typed value, non-bottom from this computation. Cont is defined as: newtype Cont r a = Cont {runCont :: (a - r) - r)} So getting the value out of the monad is not a

Re: [Haskell-cafe] Re: A free monad theorem?

2006-09-01 Thread Tomasz Zielonka
On Fri, Sep 01, 2006 at 07:22:02AM +0200, Tomasz Zielonka wrote: The real question (the one that bugs me, anyway) is if one can give a precise meaning to the informal argument that if the definition of bind is to be non-trivial then its second argument must be applied to some non-trivial

[Haskell-cafe] Re: A free monad theorem?

2006-08-31 Thread Benjamin Franksen
Chris Kuklewicz wrote: Benjamin Franksen wrote: I'd like to know if the following reasoning can be made more precise: As we all know, the monadic bind operation has type: bind :: Monad m = m a - (a - m b) - m b My intuition says that in order to apply the second argument to some

[Haskell-cafe] Re: A free monad theorem?

2006-08-31 Thread Benjamin Franksen
Tomasz Zielonka wrote: On Thu, Aug 31, 2006 at 07:23:55PM +0200, Benjamin Franksen wrote: I'd like to know if the following reasoning can be made more precise: As we all know, the monadic bind operation has type: bind :: Monad m = m a - (a - m b) - m b My intuition says that in

Re: [Haskell-cafe] Re: A free monad theorem?

2006-08-31 Thread Robert Dockins
So getting the value out of the monad is not a pure function (extract :: Monad m = m a - a). I think I stated that, already, in my previous post. I'd even say that the monadic values alone can be completely meaningless. They often have a meaning only relative to some environment, thus are

Re: [Haskell-cafe] Re: A free monad theorem?

2006-08-31 Thread Tomasz Zielonka
On Fri, Sep 01, 2006 at 01:13:14AM +0200, Benjamin Franksen wrote: So getting the value out of the monad is not a pure function (extract :: Monad m = m a - a). I think I stated that, already, in my previous post. The only generic way of extracting values from a monadic value is the bind