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