Re: Attempt at approximating Lisp's "macroexpansion"
Ian Tegebo <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAFBOwCb=yTXX_8f5qZDrdfR6FPHF+ZHZ0DiA6fCsfKwXFkTU_A@mail.gmail.com> |
On Wed, Jul 17, 2013 at 10:25 AM, Alan Baljeu <[email protected]> wrote: > Question: Does C-c C-b do the right thing? In my practice I would do this: > > 1 ?- [arec_mod]. > Then I expect everything else you did to work, but there could be a bug > somewhere. I'm not sure if C-c C-b does the right thing, but directly consulting arec_mod from user does not work either: 1 ?- [arec_mod]. % library(record) compiled into record 0.01 sec, 68 clauses % arec_mod compiled into arec_mod 0.01 sec, 88 clauses true. 2 ?- module(arec_mod). true. arec_mod: 3 ?- expand_term(:- record arec(afield:atom=''),Res). ERROR: Syntax error: Operator expected ERROR: expand_term(:- record ERROR: ** here ** ERROR: arec(afield:atom=''),Res) . arec_mod: 3 ?- current_op(_,_,record). false. arec_mod: 4 ?- module(user). true. 5 ?- current_op(_,_,record). false. I just saw that Jan replied, but I thought I'd respond to your question anyway. -- Ian Tegebo