Dear Christian, Ralf, I just realized what sort of problem I had with my code below, and what might pose a difficulty in future: namely, we cannot "deconstruct" an element of this type. More precisely:
Object: with { object: (T: PrimitiveType, T) -> %; avail: % -> (T: PrimitiveType, T); } == add { Rep == Record(T: PrimitiveType, val: T); import from Rep; object (T: PrimitiveType, t: T) : % == per [T, t]; avail (ob: %) : (T: PrimitiveType, T) == explode rep ob; } Multiset(T: Type, L: Tuple T): with { new: List Object -> %; get: (i: MachineInteger, %) -> Object; } == add { Rep == List Object; import from Rep; new(a: List Object): % == per a; get(i: MachineInteger, x: %): Object == { X: List Object := rep x; X.i; } } works, but, as you can see, we can only "get" an Object, not the element itself. I'm not sure whether this is a problem, however. All the best, Martin ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Aldor-combinat-devel mailing list Aldor-combinat-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel