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

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 :: [

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

2006-09-09 Thread Bulat Ziganshin
Hello haskell, we can consider functions as value-to-value mappings, 'type' definitions as type-to-type mappings, 'data' and 'class' as type-to-value mappings but their syntax are different. functions has the most convenient syntax: f patterns_for_parameters | guards = result we can improve rea