Last active
July 24, 2018 15:08
-
-
Save dcastro/f93bef4dbd2954ca0b9aafd37002311c to your computer and use it in GitHub Desktop.
Json decoder/encoders typeclasses are lawless
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.circe.syntax._ | |
// hypothesis: ∀ x∈X, x.asJson.as[X] == Right(x) | |
// counterexample, nested options: | |
type X = Option[Option[Int]] | |
val x: X = Some(None) | |
x.asJson.as[X] == Right(x) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment