{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxuwei-k.hatenablog.com%2Fentry%2F20140706%2F1404612620\" title=\"Haskell\u306eGADTs\u3059\u3054\u3044\u306a\u30fc\u3068\u601d\u3063\u305f\u306e\u3068\u3001\u305d\u308c\u3092scalaz.Leibniz\u4f7f\u3063\u3066\u9811\u5f35\u308b\u8a71 - xuwei-k&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"categories":["haskell","scala","scalaz"],"blog_url":"https://xuwei-k.hatenablog.com/","blog_title":"xuwei-k's blog","type":"rich","provider_name":"Hatena Blog","url":"https://xuwei-k.hatenablog.com/entry/20140706/1404612620","author_url":"https://blog.hatena.ne.jp/xuwei/","published":"2014-07-06 11:10:20","title":"Haskell\u306eGADTs\u3059\u3054\u3044\u306a\u30fc\u3068\u601d\u3063\u305f\u306e\u3068\u3001\u305d\u308c\u3092scalaz.Leibniz\u4f7f\u3063\u3066\u9811\u5f35\u308b\u8a71","author_name":"xuwei","provider_url":"https://hatena.blog","description":"\u307e\u305a\u3001\u4e0b\u8a18\u306e10\u884c\u7a0b\u5ea6\u306eScala\u30b3\u30fc\u30c9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044 sealed abstract class Foo[A, B] final case class X[A]() extends Foo[A, A] final case class Y[A, B](a: A, b: B) extends Foo[A, B] object Main { def hoge[F[_, _], A, B, C](foo: Foo[A, B], bar: F[A, C]): F[B, C] = foo match { case X() => bar case Y(a, b) => ??? // Y\u306e\u5834\u5408\u306e\u30b3\u30fc\u30c9\u306f\u3069\u2026","height":"190","width":"100%","version":"1.0"}