Okay, I suspected as much. Is there any builtin way to run general portrays without writing them to a stream? If not, this might be quite handy in future. cheers, josh Josh Singer Software Developer, Parc Technologies Limited Tel. +44 (0)207 261 4067 josh.singer@parc-technologies.com http://www.parc-technologies.com This e-mail message is for the sole use of the intended recipient(s) -its contents are the property of Parc Technologies Limited (or its licensors) and are confidential. Please do not copy, review, use (except for the intended purposes), disclose or distribute the e-mail or its contents (or allow anyone else to do so) without our prior permission. Parc Technologies Limited does not guarantee that this e-mail has not been intercepted and amended nor that it is virus-free. You should carry out your own virus checks before opening any attachment. Any opinions expressed in this e-mail message are those of the author and not necessarily Parc Technologies Limited. > -----Original Message----- > From: Joachim Schimpf [mailto:j.schimpf@icparc.ic.ac.uk] > Sent: 23 June 2003 14:47 > To: josh singer > Cc: 'eclipse-bugs@icparc.ic.ac.uk' > Subject: Re: portray_goal/2 > > > 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/eclipse >Received on Mon Jun 23 16:00:58 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:23 PM GMT GMT