comparison 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
comparison
equal deleted inserted replaced
21:e7d64ea0f922 22:8de201d70b91
14 val json_bool : json bool 14 val json_bool : json bool
15 val json_option : a ::: Type -> json a -> json (option a) 15 val json_option : a ::: Type -> json a -> json (option a)
16 val json_list : a ::: Type -> json a -> json (list a) 16 val json_list : a ::: Type -> json a -> json (list a)
17 17
18 val json_record : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json $ts 18 val json_record : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json $ts
19 val json_variant : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json (variant ts)
20
21 val json_unit : json unit