data AAA = X Int Int | Y Int Int Int main = print (fff (X 12 24), fff (Y 1 2 3)) fff :: AAA -> Int fff (X x y) = x + y fff (Y x y _) = x + y