On 3 February 2011 02:35, Brandon Moore <brandon_m_mo...@yahoo.com> wrote:

> 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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to