> * 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


Yes to this.  I too have always wondered why this wasn't allowed in the
first place.

>Valid syntax would then also be:
>
>  (>+<) :: F a b -> F c d -> F (a `Either` c) (b `Either` d)


And if the above passes, I hope that Either will be renamed to (+), or at
least deprecated in favor of (+).  (Personally I think that (,) should be
renamed to (*) as well---or vice versa for the corresponding function
value---but I won't push it, since I know that (,) appears in a million
Haskell programs.)  Either is a very useful type, but its name is too long
and I hate it when type signatures span more than one line.

--FC



Reply via email to