@@ -61,6 +61,9 @@ genericToFromJSON x = case G.fromJSON . G.toJSON $ x of
6161 Error _ -> False
6262 Success x' -> x == x'
6363
64+regress_gh72 :: [(String, Maybe String)] -> Bool
65+regress_gh72 ys = G.decode (G.encode m) == Just m
66+ where m = Map.fromList ys
6467
6568data Foo = Foo {
6669 fooInt :: Int
@@ -114,6 +117,9 @@ main = defaultMain tests
114117
115118tests :: [Test]
116119tests = [
120+ testGroup "regression" [
121+ testProperty "gh-72" regress_gh72
122+ ],
117123 testGroup "encode" [
118124 testProperty "encodeDouble" encodeDouble
119125 , testProperty "encodeInteger" encodeInteger