The function you want is PolyML.NameSpace.Values.printType but you need
to combine this with other functions to actually print the type of a value.
PolyML.prettyPrint (print, 70)
(
PolyML.NameSpace.Values.printType(
PolyML.NameSpace.Values.typeof (valOf (#lookupVal
PolyML.globalNameSpace "print")),
1000,
SOME PolyML.globalNameSpace
)
);
David
On 06/03/2019 10:07, Gergely Buday wrote:
Hi,
typing an identifier in the REPL gives its type:
print;
val it = fn: string -> unit
is there a polyml function that gives back a string of the type without the
fn: prefix? I would like to use it in documentation. I have taken a look in
the PolyML.NameSpace structure but did not find such a function.
- Gergely
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml