[Haskell-cafe] Desugaring of infix operators is (always?) the
wrong way round
Henning Thielemann
lemming at henning-thielemann.de
Wed Sep 26 05:40:42 EDT 2007
On Tue, 25 Sep 2007, Brian Hulley wrote:
> Of course the problem disappears if you just discard multiple clause syntax
> and use:
>
> (list :: a List) (f :: a -> b) map :: b List =
> case list of
> Empty -> Empty
> h t PushF -> (h f) (t f map) PushF
This would also have the advantage, that there is a name assigned to each
parameter, which is nice for documentation purposes. However we would also
have to assign a name to the parameter of 'f', and the (->) type
constructor becomes somehow special, at least more special than it is now.
Curried functions like
f :: a -> b -> c
suggest a swapped order of arguments for (->), since 'f' must be called
this way
b a f
Maybe it should be
f :: c <- b <- a
More information about the Haskell-Cafe
mailing list