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