[mercury-users] $pred doesn't work in lambda expressions
Peter Wang
novalazy at gmail.com
Thu Jul 24 11:39:46 AEST 2008
On 2008-07-24, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> > This was fixed about a month ago. However,
> >
> > main(!IO) :-
> > P = (pred(!.IO::di, !:IO::uo) is det :-
> > io.write_string($pred, !IO),
> > io.nl(!IO)
> > ),
> > P(!IO).
> >
> > will print
> >
> > predicate `pre.main'/2
> >
>
> Is it printing the name of the predicate that defined the lambda
> expression (the closure's parent environment) or the name of the
> predicate that is calling the lambda expression.
The former.
Peter
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list