
31 May
2023
31 May
'23
11:25 a.m.
Dear Cafe, The expression \x -> f x == g x is a testable property, as long as values for x can be randomly generated. For clarity I'd prefer a point-free style, e.g. f ≡ g Are there extensions to QuickCheck that let me write this? The QuickCheck package itself does not seem to contain such an operator. My current work-around is a newtype ExtensionalEquality a b that holds two functions of type (a -> b) and a Testable instance for it. But I've got a hunch that I re-invented some wheel here. (My ExtensionalEquality is isomorphic to Refl (a -> b) (a -> b) but Refl ist conceptually about type equality, not term equality.) Thanks Olaf