SWI-Prolog / packages-pengines

Pengines: Prolog engines
11 stars 13 forks source link

Document positioning of safe_primitive defs #47

Open ridgeworks opened 5 years ago

ridgeworks commented 5 years ago

From [https://groups.google.com/forum/#!msg/swi-prolog/uJq7xF_5FV0/y5a1sesnBwAJ]:

> I have tried including a 'make' goal by declaring it safe with the 
> sandbox predicates, but I get an error 'no permission to declare 
> safe_goal 'door:my_make(_G273)' 

This should in theory work, but the declaration must be *after* the 
predicate declaration as it is checked not to be obviously wrong. In 
particular it does not allow defining meta-predicates as safe primitives 
as that would make everything safe. 

        Cheers --- Jan 

This ordering dependency should be in the documentation somewhere.

Apologies if I missed it, but I couldn't find it in either pengines or sandbox.