[cduce-users] issues about queries

Giuseppe Castagna Giuseppe.Castagna at ens.fr
Thu May 11 11:56:55 CEST 2006


Pierluigi Sanna wrote:
> Hi, there is no type corresponding to an author; this information is
> stored in a string inside a type field(e.g.  <type>author</type>), so
> I use the funciont tipi to get a sequence of String, and isAuthor to
> kwno if inside this sequence there is a string of type author.

Then, why you do not use intersection types?

type Author = <type>"author"
type AuthorEdges = edges & <_>[ _* <types>[_* Author _*] ]

Etc ...

That said, I do not know your specific application but I would suggest 
to get rid of some nesting, e.g.

type edge = <edge id=String target=String source=String>[
               property*
               type+ ]

--Beppe---



More information about the Cduce-users mailing list