Hi,

Does anyone know why the following type signature is invalid?

second :: *a .a -> *a
second x y = x

I am getting this message
Error [matrices.icl,12,second]: a inconsistently attributed (4)

I came across this trying to type a more complex function with arrays, but it 
boils down to signature above.

Why the uniqueness attribute has to be the same for two independent parameters 
that just happen to have the same type?

A workaround I found was to use two different type variables, like
second :: *a .b -> *a
which will work properly on usage site by unification, but still I was 
wondering what the problem was with the first one.

regards
Carlos


      
__________________________________________________________________________________
Win 1 of 4 Sony home entertainment packs thanks to Yahoo!7.
Enter now: http://au.docs.yahoo.com/homepageset/

_______________________________________________
clean-list mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/clean-list

Reply via email to