Thanks. What I really want to know is: How to describe a new type (Funcmap) which is itself a function type like a->b-
c so that I can use this new type in other functions? for example, I can define some other functions like:
theta :: Functionmap -> d ->e minus :: Funcmap ->...... I can put all the things there like : theta :: (a->b->c)->d->e but sometimes it's not convenient to do so. rui 引用 Lennart Augustsson <lennart@augustsson.net>:
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
---------------------------------------- This mail sent through www.mywaterloo.ca