Re: [Haskell] Re: putStr is not evaluated in the correct order

2006-09-10 Thread Bruno Martínez
On Sat, 09 Sep 2006 23:34:55 -0300, David Sankel <[EMAIL PROTECTED]> wrote: On 9/5/06, Bruno Martínez <[EMAIL PROTECTED]> wrote: C++ avoids this problem 'tieing' cin and cout. Why can't haskell do the same? I was thinking the same thing. I'm imagining a situation where processes are comm

Re: [Haskell] Proposal: unification of style of function/data/type/class definitions

2006-09-10 Thread Taral
On 9/10/06, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: data Expr t = If (Expr Bool) (Expr t) (Expr t) Expr Int = Lit Int Expr Bool | Eq t = Eq (Expr t) (Expr t) I find this somewhat unreadable due to the implicit "t" parameter not showing up on the left-hand side...

Re: [Haskell] Proposal: unification of style of function/data/type/class definitions

2006-09-10 Thread Tomasz Zielonka
On Sun, Sep 10, 2006 at 10:08:22AM +0400, Bulat Ziganshin wrote: > we can improve readability of various declarations by using the same > scheme: > > class Monad m | Functor m, Monoid m where ... > > instance Monad (WriterT m) | Monad m where ... > > sequence :: [m a] -> m [a] | Monad m I am no

[Haskell] Re: Proposal: unification of style of function/data/type/class definitions

2006-09-10 Thread Jón Fairbairn
"Neil Mitchell" <[EMAIL PROTECTED]> writes: > Hi, > > > class Monad m | Functor m, Monoid m where ... > > Nice - I was having exactly this problem in Hoogle, if you list all > the class dependancies first, you can't really see the actual class. > It also makes grep'ing easier. > > > data Encode

Re: [Haskell] Proposal: unification of style of function/data/type/class definitions

2006-09-10 Thread Neil Mitchell
Hi, class Monad m | Functor m, Monoid m where ... Nice - I was having exactly this problem in Hoogle, if you list all the class dependancies first, you can't really see the actual class. It also makes grep'ing easier. data EncodedStream m h | Monad m, Stream m h = ... Ditto sequence :: [