a type question

Lennart Augustsson lennart at augustsson.net
Wed Nov 26 22:49:55 EST 2003


rui yang wrote:
> Suppose I have a function:
> 
>  funcmap  :: a->b->c
> 
> can I use type synonyms to describe a new type like this:
>  Type Funcmap  = a->b>c ?

First, it's 'type' not 'Type'.
Second, you want '->' not '>'.
Third, all type variables in the RHS must be on the LHS.
So, we get

	type Funcmap a b c = a->b->c



More information about the Haskell mailing list