check/0 hook

Michael Hendricks <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAFHuXuYpL7ByCFuLf=N5_rQ9+ouuUOMoNmo=mu_s97nXp2zk-A@mail.gmail.com>
I want check/0 to perform some additional checks when one of my libraries
is loaded.  For example, if one uses library(mavis), check/0 might check
for goals which fail because of trivial type violations, in addition to the
checks performed already.

Is a patch likely to be accepted which adds a multifile predicate like

    check:check_hook(Description, Goal).

then check/0 would do

  findall(Description-Goal, check_hook(Description,Goal), Rules),
  % print_message and call(Goal) for each rule
  ...

Thanks.

-- 
Michael
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.