import "JavaBuiltin" as Java data Foo = Foo () ff = Foo () gg () = 3 :: Integer main = gg (match ff with Foo a -> a) -- 3