How can I do this: class M a where tok::a->String instance M String where tok s="String" instance Num a=>M a where tok n="Number" instance (for all other types a)=>M a where tok x="Other"