{"blog_url":"https://myuon-myon.hatenablog.com/","provider_url":"https://hatena.blog","categories":["Haskell"],"title":"DataKinds\u3068GADT\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066","height":"190","author_url":"https://blog.hatena.ne.jp/myuon_myon/","url":"https://myuon-myon.hatenablog.com/entry/2015/06/14/222142","type":"rich","description":"Haskell\u3067\u578b\u30ec\u30d9\u30eb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0(\u3042\u308b\u3044\u306f\u3054\u304f\u7c21\u5358\u306a\u8a3c\u660e)\u3092\u66f8\u304f\u3068\u304d\u306b, DataKinds\u3067\u30c7\u30fc\u30bf\u578b\u3092\u305d\u306e\u307e\u307e\u6301\u3061\u4e0a\u3052\u308b\u3068\u56f0\u308b\u5834\u9762\u304c\u3042\u308b. {-# LANGUAGE DataKinds, GADTs, TypeOperators, TypeFamilies #-} data a :=: b where Refl :: a :=: a data Nat = Zero | Succ Nat type family (:+:) a b where Zero :+: n = n (Succ n) :+: m = Succ (n :+: m) \u3068\u5b9a\u7fa9\u3057\u305f\u6642, \u300c\u4efb\u610f\u306e\u81ea\u7136\u6570n\u306b\u3064\u3044\u3066n+0=n\u300d\u2026","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmyuon-myon.hatenablog.com%2Fentry%2F2015%2F06%2F14%2F222142\" title=\"DataKinds\u3068GADT\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066 - Just $ A sandbox\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"myuon_myon","width":"100%","image_url":null,"provider_name":"Hatena Blog","blog_title":"Just $ A sandbox","published":"2015-06-14 22:21:42"}