{"action":"created","issue":{"url":"https://api.github.com/repos/logicmoo/swipl-devel-unstable/issues/10","repository_url":"https://api.github.com/repos/logicmoo/swipl-devel-unstable","labels_url":"https://api.github.com/repos/logicmoo/swipl-devel-unstable/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/logicmoo/swipl-devel-unstable/issues/10/comments","events_url":"https://api.github.com/repos/logicmoo/swipl-devel-unstable/issues/10/events","html_url":"https://github.com/logicmoo/swipl-devel-unstable/issues/10","id":132060417,"number":10,"title":"meta_predicate/1 should module_transparent/1 in all cases (otherwise users should use mode/1)","user":{"login":"logicmoo","id":466945,"avatar_url":"https://avatars.githubusercontent.com/u/466945?v=3","gravatar_id":"","url":"https://api.github.com/users/logicmoo","html_url":"https://github.com/logicmoo","followers_url":"https://api.github.com/users/logicmoo/followers","following_url":"https://api.github.com/users/logicmoo/following{/other_user}","gists_url":"https://api.github.com/users/logicmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/logicmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logicmoo/subscriptions","organizations_url":"https://api.github.com/users/logicmoo/orgs","repos_url":"https://api.github.com/users/logicmoo/repos","events_url":"https://api.github.com/users/logicmoo/events{/privacy}","received_events_url":"https://api.github.com/users/logicmoo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-08T06:10:49Z","updated_at":"2016-02-08T18:09:11Z","closed_at":"2016-02-08T08:14:47Z","body":"`meta_predicate/1` should `module_transparent/1` in all cases \r\nOtherwise users should use mode/1.\r\n\r\n```\r\nmeta_predicate(Modes):-\r\n  compound_name_arity(Modes,F,A),\r\n  module_transparent(F/A),\r\n  mode(Modes).\r\n```\r\n\r\n* `mode/1` to call current `meta_predicate/1` impl C \r\n * However, do not make it transparent.\r\n"},"comment":{"url":"https://api.github.com/repos/logicmoo/swipl-devel-unstable/issues/comments/181504981","html_url":"https://github.com/logicmoo/swipl-devel-unstable/issues/10#issuecomment-181504981","issue_url":"https://api.github.com/repos/logicmoo/swipl-devel-unstable/issues/10","id":181504981,"user":{"login":"DouglasRMiles","id":469763,"avatar_url":"https://avatars.githubusercontent.com/u/469763?v=3","gravatar_id":"","url":"https://api.github.com/users/DouglasRMiles","html_url":"https://github.com/DouglasRMiles","followers_url":"https://api.github.com/users/DouglasRMiles/followers","following_url":"https://api.github.com/users/DouglasRMiles/following{/other_user}","gists_url":"https://api.github.com/users/DouglasRMiles/gists{/gist_id}","starred_url":"https://api.github.com/users/DouglasRMiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DouglasRMiles/subscriptions","organizations_url":"https://api.github.com/users/DouglasRMiles/orgs","repos_url":"https://api.github.com/users/DouglasRMiles/repos","events_url":"https://api.github.com/users/DouglasRMiles/events{/privacy}","received_events_url":"https://api.github.com/users/DouglasRMiles/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T18:09:11Z","updated_at":"2016-02-08T18:09:11Z","body":"```\r\n\r\n:- module_transparent(mpred_ops/0).\r\n\r\n%% mpred_ops is semidet.\r\n%\r\n% Managed Predicate Oper.s.\r\n%\r\nmpred_ops:-  \r\n   prolog_load_context(module,SM),\r\n   context_module(CM),\r\n   mpred_ops(SM,CM).  \r\n\r\nmpred_ops(SM,CM):- mpred_op_each(mpred_op_unless(SM,CM)).\r\n\r\nmpred_op_unless(SM,CM,Prio,YFX,OP):-  \r\n   current_op(_,YFX,SM:OP)-> true;  \r\n   (op(_,_,SM:OP),\r\n     (CM==SM % nothing to do\r\n       -> true;\r\n        (module_property(SM,exported_operators(List)),member(op(_,_,OP),List))\r\n          -> true ; \r\n          (current_op(_,YFX,CM:OP) \r\n            -> true ;  \r\n\t      op(Prio,YFX,CM:OP))).\r\n\r\nmpred_op_each(OpEach):-\r\n            call(OpEach,1199,fx,('==>')), % assert\r\n            call(OpEach,1199,fx,('?->')), % ask\r\n            call(OpEach,1190,xfy,('::::')), % Name something\r\n            call(OpEach,1180,xfx,('==>')), % Forward chaining\r\n            call(OpEach,1170,xfx,('<==>')), % Forward and backward chaining\r\n            call(OpEach,1160,xfx,('<==')), % backward chain PFC sytle\r\n            call(OpEach,1160,xfx,('<-')), % backward chain PTTP sytle (currely really PFC)\r\n            call(OpEach,1160,xfx,('<=')), % backward chain DRA sytle\r\n            call(OpEach,1150,xfx,('=>')), % Logical implication\r\n            call(OpEach,1130,xfx,('<=>')), % Logical bi-implication\r\n            call(OpEach,600,yfx,('&')), \r\n            call(OpEach,600,yfx,('v')),\r\n            call(OpEach,400,fx,('~')),\r\n            % call(OpEach,300,fx,('-')),\r\n            call(OpEach,350,xfx,('xor')).\r\n```\r\n"}}