@@ -143,7 +143,10 @@ parserCatchErrorProp path msg =
143143-- variation in JSON object key ordering.
144144sameAs :: (a -> Value) -> (a -> Encoding) -> a -> Property
145145sameAs toVal toEnc v =
146− eitherDecode (encodingToLazyByteString (toEnc v)) === Right (toVal v)
146+ counterexample (show s) $
147+ eitherDecode s === Right (toVal v)
148+ where
149+ s = encodingToLazyByteString (toEnc v)
147150
148151sameAs1
149152 :: (forall a. LiftToJSON f a)