caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] GADTs and JSON
@ 2015-05-21 16:42 Trevor Smith
  2015-05-21 16:59 ` Milan Stanojević
  2015-05-21 18:44 ` Rodolphe Lepigre
  0 siblings, 2 replies; 3+ messages in thread
From: Trevor Smith @ 2015-05-21 16:42 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

Hello,

Is it possible to encode a recursive, heterogenous map and list
datastructure with GADTs?

I want to encode JSON (there are already a couple of great libraries out
there so this is kind of an academic question). I would like to have
functions that can only take a JSON map type, for example to take a json
map and return a value. The key here is that the map can hold values of
type int,string and also maps. Is this possible?

eg get : (map : map json) -> key:string -> 'a json

Thank you.

Trevor

[-- Attachment #2: Type: text/html, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-21 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 16:42 [Caml-list] GADTs and JSON Trevor Smith
2015-05-21 16:59 ` Milan Stanojević
2015-05-21 18:44 ` Rodolphe Lepigre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).