[m-rev.] diff: mercury versions of library pragma foreign_procs
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Jun 12 15:28:58 AEST 2002
On 12-Jun-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Fergus Henderson, Tuesday, 11 June 2002:
> >
> > There should be comments on all those calls to sorry/1, explaining that
> > this is just a default for back-ends that don't support the C interface.
>
> But isn't that what sorry/1 says (well, omitting the specific reference
> to the C back end.)
Well, no; calling sorry/1 could mean that either
(1) the feature is not implemented at all
or (2) this feature is implemented in foreign code, and
the call to sorry/1 is just a default for back-ends
that don't support any of the foreign languages in
which the procedure has been implemented.
The message that sorry/1 prints out is
"sorry, `" ++ PredName ++ "' not implemented\n" ++
"for this target language (or compiler back-end)"
which, although emphasizing case (2), is intended to cover both cases.
Note that we also have sorry/2 in the compiler directory,
which is definitely for case (1). The semantics of sorry/1
in the library should be consistent with this.
Perhaps sorry/1 should be renamed default_sorry/1, and used only for case (2),
and we should add a new sorry/1 for case (1).
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list