2009-04-18から1日間の記事一覧
{-# OPTIONS -fglasgow-exts #-} {-# LANGUAGE UndecidableInstances #-} data Zero = Zero data Succ a = Succ a class Add a b ab | a b -> ab where add :: a -> b -> ab instance Add Zero b b where add = undefined instance (Add a b ab) => Add (Suc…