Il y a 1 heure et 39 minutes, Guilhem de Wailly écrivit : > Cyprien, > > I put the code in my main.scm > > (define bla '(some value)) > (pp (cer bla)) > (pp (typeof bla)) > > > I can compile it, but at run time I got: > > File "main.scm", line 28, character 571: > #(pp (cer bla)) > # ^ > *** ERROR:toplevel-init > Type "epair" expected, "pair" provided -- (some value) > 1. %toplevel@myAltisServer, main.scm:5 > > Could you please help me one more time?
Sure. Actually it's better to not use cer with quoted list, but prefer using it at macro-expansion time. I attach a sample file that create two macros `foo' and `bar', each taking some scheme expression which are displayed and evaluated (and the result of the evaluation is displayed too). I use the CER feature to get the location of the macro's arguments. The foo macro is defined using define-macro, while `bar' use bigloo's expander system. Hope this helps, Regars, -- Cyprien Nicolas
epair.scm
Description: Lotus Screencam
signature.asc
Description: Digital signature
