Portray transformations come in two flavours: either they apply to any occurrence of a particular functor, or they are goal-only, i.e. only applied when the printed term is known to be a goal (rather than plain data). portray_goal/2 only applies goal-portray transformations. You therefore have to declare :- export portray(s/1, tr_s/2, [goal]). to make it work. The reason it looks like it is working is that the toplevel printing applies (even non-goal) portray transformations to whetever it prints. If you switch this off, you see that portray_goal didn't acutally do anything: [eclipse 4]: portray_goal(s(s(s(0))), X) @ ptest. X = 3 Yes (0.00s cpu) [eclipse 5]: set_flag(output_mode, "QPmT"). Yes (0.00s cpu) [eclipse 6]: portray_goal(s(s(s(0))), X) @ ptest. X = s(s(s(0))) Yes (0.00s cpu) -- Joachim Schimpf / phone: +44 20 7594 8187 IC-Parc / mailto:J.Schimpf@imperial.ac.uk Imperial College London / http://www.icparc.ic.ac.uk/eclipseReceived on Mon Jun 23 14:47:02 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:23 PM GMT GMT