[mercury-users] pragma memo and failure determinism
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Jul 4 21:37:11 AEST 2006
On Mon, 3 Jul 2006, Peter Hawkins wrote:
> Hi...
>
> I'm seeing the following error in my programs:
> foo.m:969: Error: `pragma memo' declaration not allowed for procedure
> with
> foo.m:969: determinism `failure'.
>
> While I admit tabling a predicate with failure determinism is a
> stupid thing to do, the mercury program I'm compiling is the output
> of another compiler which doesn't do its own determinism inference
> and doesn't know that Mercury will infer the determinism failure for
> this predicate. The other compiler blindly puts pragma minimal_model
> declarations on everything.
I assume that you meant pragma memo there.
> Would it be possible for this error to
> become a warning instead, and have Mercury ignore the pragma memo
> declaration in this case?
No, it as an error and by default the compiler should treat it as such.
It would be possible to add an option that did what you wanted but I'm
not sure that such a thing is generally applicable (beyond scratching
your particular itch.)
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list