[quickcheck: new property about match and apply
Helmut Grohne <grohne@cs.uni-bonn.de>**20150325130330
 Ignore-this: ea5aeacb39065d13e825204db726d3f0
] hunk ./src/Tests.hs 80
+runContext = flip runReader defaultContext
+
hunk ./src/Tests.hs 83
-lggTypeAssociative t1 t2 t3 = flip runReader defaultContext $ (do
+lggTypeAssociative t1 t2 t3 = runContext $ (do
hunk ./src/Tests.hs 90
+matchApply :: Type -> Type -> QC.Property
+matchApply t1 t2 = runContext $ (do
+    s <- match t1 t2
+    let t2' = apply s t2
+    return $ qcCompare equal t1 (apply s t2)
+    ) `safeCatchErrorC` const QC.discard
hunk ./src/Tests.hs 98
-    testProperty "Types: lgg [a, lgg [b, c]] == lgg [a, b, c]" lggTypeAssociative
+    testProperty "Types: lgg [a, lgg [b, c]] == lgg [a, b, c]" lggTypeAssociative,
+    testProperty "Types: apply (match a b) b == a" matchApply