[Ur] Save recursive datatype in a DB

Adam Chlipala adamc at csail.mit.edu
Mon Apr 14 08:16:52 EDT 2014


On 04/14/2014 03:13 AM, Marco Maggesi wrote:
> I have a tree-like datatype as follows
>
> datatype tree =
>   | Leaf of { Label : string }
>   | Node of { Label : string, Children : list tree}
>
> and I would like to write values of tree type inside an SQL database.

I expect the built-in [serialized] type family is exactly what you 
want.  You could help me test the documentation, by seeing if this tip 
is enough to point you in the right direction without more detail here. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20140414/1e2e09ef/attachment.html>


More information about the Ur mailing list