synonym type not allowed

Paul de Mast paul.demast@ptf.hwb.nl
Wed, 17 Dec 1997 17:15:54 MET


The following type synonym is not allowed:

:: Asyntype :== Int -> Int

f :: Asyntype
f x = x + 1

Now the compiler complains:

Error [..]: <function type> wrong arity.

However the following is correct:

:: Asyntype :== Int -> Int

f :: Asyntype
f = (+) 1

Shouldn't both function definitions for f have the same type? 

(The compiler derives the same type for both definitions of f, but 
somehow both situations are treated differently.) 


Paul de Mast