I have defined:

> class Aggregate a where
>  toList::(Num b)=>a->[b]
>  fromList::(Num b)=>[b]->a

> data MyAgg =Agg Int Int
> instance Aggregate MyAgg where
>  toList (Agg x y) = [x,y]
>  fromList [x,y] = (Agg x y)

Hugs won't compile this because it says the declared type is too general.
Any function that requires an Aggregate can use MyAgg.  Why am I
getting an error?  

-Alex-

___________________________________________________________________
S. Alexander Jacobson                   i2x Media  
1-212-697-0184 voice                    1-212-697-1427 fax


Reply via email to