Mercurial > meta
diff json.urs @ 22:8de201d70b91
Implement JSON typeclass for polymorphic variants.
author | Edward Z. Yang <ezyang@mit.edu> |
---|---|
date | Wed, 02 May 2012 11:47:37 -0400 |
parents | 943410267fad |
children | 9d6b931fbd13 |
line wrap: on
line diff
--- a/json.urs Thu Jan 05 18:04:04 2012 -0500 +++ b/json.urs Wed May 02 11:47:37 2012 -0400 @@ -16,3 +16,6 @@ val json_list : a ::: Type -> json a -> json (list a) val json_record : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json $ts +val json_variant : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json (variant ts) + +val json_unit : json unit