MicroHs-0.17.4.0 / tests / Multi.hs
module Multi(main) whereimport Data.Charclass C a b where conv :: a -> binstance C Int Bool where conv x = x /= 0instance C Int Char where conv = chrinstance C Char Int where conv = ordmain :: IO ()main = do print (conv (100::Int) :: Bool) print (conv (100::Int) :: Char) print (conv 'a' :: Int)