[Aldor-l] reflection about aldor domains

Ralf Hemmecke ralf at hemmecke.de
Mon Aug 15 17:07:07 EDT 2005


I'd like to implement a function that returns the names and (pointers 
to) functions provided by some domain.

For example, for

Dom(T: Type): with {
   foo: T -> T;
   bar: T -> T;
} == add {
   foo(t: T): T == ...;
   bar(t: T): T == ...;
   baz(t: T): T == ...;
}

How can a function

exportedFunctions(D: Type): List Cross(String, Type) == ...

be implemented that returns [("foo", foo), ("bar", bar)] for 
exportedFunctions(Dom String)?

Is there a chance to get such information out of a domain? Of course, it 
would be even better to get also the type of the function so that it 
would not be necessary to "pretend" something later.

Ralf




More information about the Aldor-l mailing list