data A = A Int; data B a = B1 a A | B2 ; foo (B1 _ (A i)) = i; main = foo (B1 "Stefan" (A 42));