[Haskell-cafe] Instance Problem

98222 at oa.cmbchina.com 98222 at oa.cmbchina.com
Fri Mar 5 08:43:27 EST 2004





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"



More information about the Haskell-Cafe mailing list