
3 Feb
2011
3 Feb
'11
5:19 a.m.
On 3 February 2011 02:35, Brandon Moore
Here's one thing to consider:
Can you write a function
f :: (Data a) => a -> String f x = termTag x
It would seem the Data a => Term a instance justifies this function, and it will always use the default instance.
Now, what happens if "f" is applied to a value of some type T which is an instance of Data, but has a custom Term instance?
Great point, thanks! I guess somehow you shouldn't be allowed to write that function "f". I need to think about this one. -- Ozgur