Hi all,

I just read the "Standard Haskell Decisions" at

  http://www.cs.chalmers.se/~rjmh/Haskell/Messages/Decisions.cgi

I would like to say a few things about it.

 * First of all, compare the decisions "Pattern match failure in do will
cause an error" and "Add pattern guards". Simon came up with the very nice
notation of pattern guards. Failing of pattern matching is quite important
in this syntax, because it will jump to the next case. But the pattern
guard syntax has exactly the same notation as qualifiers inside the
do-notation. Only the syntax has now been made completely different! Why?

 * Secondly, "Restrictions on name spaces removed". As an addition to
this, I would like to propose the following modest extension to Haskell.
Why don't we allow type constructors with more than one argument to be
written as operators? An obvious example to define would be:

  data a :+: b = Left a | Right b
  data a :*: b = Pair a b

This is nice, because it makes the definition of the different name space
classes rather easy: Capitalized names and operators starting with `:' as
constructors, types and class names, and decapitalized names and other
operators as variables and type variables. I think the restriction there
is now is rather artificial and I have been wondering why it is there from
when I started programming in Haskell.

Valid syntax would then also be:

  (>+<) :: F a b -> F c d -> F (a `Either` c) (b `Either` d)

It is also nice in combination with "lifting the restriction of one
parameter in type classes":

  class a :-->: b where
    ...

 * Further, Why don't you name the generalised map for Functors and
Monads, mapM, and rename mapM to the more consistent mapL (as opposed to
mapR)?

Regards,
Koen.

--
Koen Claessen,
[EMAIL PROTECTED],
http://www.cs.chalmers.se/~koen,
Chalmers University of Technology.


Reply via email to