Re: check/0 hook
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 12/26/2013 04:25 PM, Michael Hendricks wrote: > On Thu, Dec 26, 2013 at 4:53 AM, Jan Wielemaker <[email protected] > <mailto:[email protected]>> wrote: > > I'm in favour. I wouldn't call it a hook. I propose a multifile and > dynamic > > check:checker(Goal, Message) > > The execution can use a failure driven loop, possibly using a catch > with print_message to report errors in the registered checkers without > breaking the process. > > > That sounds good. I'll follow that design. > > Do we want to retain the pass numbers ("PASS 1: ...", etc). With a > failure driven loop I'd have to use nb_setval/2. I suppose I could use > findall and a recursive loop instead. Alternatively, we could remove > the numbers and just have "PASS: ..." I mostly ignore the numbers, so > perhaps they can be removed. Any preference? I'd propose to just drop the pass numbers. Simpler and they are meaningless anyway. Cheers --- Jan