[m-users.] Uncaught exception

Peter Berry pwberry at gmail.com
Wed Apr 16 10:08:20 AEST 2014


Sometimes I try developing a new predicate starting with a clause
"head(Args) :- fail.", then add actual code under it when I get round to
that case. If I forget to remove the "fail.", mmc gets confused as it
thinks it's looking at a definition of ,/2:

:- module test.
:- interface.
:- pred test is det.
:- implementation.
test :- fail.
    test,
    test,
    test.

/*
pwb at rhuidean /tmp $ mmc -c test.m
Uncaught Mercury exception:
Software Error: hlds.pred_table: predicate `hlds.pred_table.get_proc_id'/3:
Unexpected: cannot take address of pred
`,/2' with no modes.
(Sorry, confused by earlier errors -- bailing out.)
*/

-- 
Peter Berry <pwberry at gmail.com>
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20140416/e7817aa1/attachment.html>


More information about the users mailing list