{-# 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 (Succ a) b (Succ ab) where
add = undefined