summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2019-11-08 16:16:14 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2019-11-08 16:16:14 -0500
commit73c287964e8d41d9b3b53a81f0ace3f509dc6a20 (patch)
treee127d1ebf79507a49479a834533c5fcf4627c328 /lib
parent51a8b325dc30d2c6d8debbeb911ea9c4bb345476 (diff)
Json: expose RFC 3339 functions
Diffstat (limited to 'lib')
-rw-r--r--lib/ur/json.urs5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ur/json.urs b/lib/ur/json.urs
index 7b83d03d..ad49a40f 100644
--- a/lib/ur/json.urs
+++ b/lib/ur/json.urs
@@ -17,6 +17,11 @@ val json_time : json time
val json_option : a ::: Type -> json a -> json (option a)
val json_list : a ::: Type -> json a -> json (list a)
+(* By the way, time formatting follows RFC 3339, and we expose the more
+ * primitive formatting functions here. *)
+val rfc3339_out : time -> string
+val rfc3339_in : string -> time
+
val json_record : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json $ts
val json_record_withOptional : ts ::: {Type} -> ots ::: {Type} -> [ts ~ ots]
=> folder ts -> $(map json ts) -> $(map (fn _ => string) ts)