[clean-list] Re: HUGS Equivalent in Clean

Richard A. O'Keefe ok@atlas.otago.ac.nz
Fri, 20 Jul 2001 11:34:25 +1200 (NZST)


	I think you'll find Clean very similar to Haskell. The module system
	is different and there are some minor syntactical differences, but
	most everything you've learned about Haskell will also apply to
	Clean.
	
One thing I find extremely irritating is writing
    if Test then E1 else E2
in Haskell, but
    if (Test) (E1) (E2)
in Clean (yes, the parentheses are very often necessary).
For some reason this always trips me up.

Yes, I know that if *can* be a perfectly ordinary function in Clean,
and it's very clever of the Clean team to make it all work so well,
but the Haskell syntax here just seems to work out better, somehow.

Another irritation is that
    f :: (x y -> z) (x -> y) x -> z
    f g h x = g x (h x)
in Clean, but
    f :: (x -> y -> z) -> (x -> y) -> (x -> z)
    f g h x = g x (h x)
in Haskell.  I understand why Clean distinguishes between
(x y -> z) and (x -> y -> z), although they are the "same" type;
I can see the use of it, but occasionally it requires me to write
a signature for the definition that is different from the way I want
to think about using it, and that's regrettable.

In an ideal world I'd be asking for an additional front end whose syntax
was much closer to Haskell's; in the real world there are more important
tasks I'd like the Clean team to be able to finish first.