[Ur] Save recursive datatype in a DB

Marco Maggesi maggesi at math.unifi.it
Mon Apr 14 10:21:15 EDT 2014


​Ah, good.
Thanks, This solves my problem.
As a side curiosity, can the serialised type family be used to
encode/decode to xml?



2014-04-14 14:16 GMT+02:00 Adam Chlipala <adamc at csail.mit.edu>:

>  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/936a4055/attachment.html>


More information about the Ur mailing list