struct Id a = id :: a -> a struct Any < Id a struct Any2 < Id a = extra :: Int s1 = struct id x = x s2 = struct id x = 'a':x s3 = struct id x = x; extra = 2 -- bad1 = struct id x = 'a':x ; extra = 2 ok1 y = if y.extra == 1 then y.id ('a':) "" else y.id "" -- bad2 = \y -> if True then y.id ('a':) "" else y.id "" ok2 :: Any2 -> String ok2 y = if True then y.id ('a':) "" else y.id ""