Re: File and line number in the source file
Cyprien Nicolas <[email protected]>
| Newsgroups | gmane.lisp.scheme.bigloo |
|---|---|
| Message-ID | <[email protected]> |
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
(application/vnd.lotus-screencam, 1 KB) - not displayed
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlPJKacACgkQQHQZc4Ru+vEJogCggnK2b7kSFq2sJDFdCv0RSNYB KIwAn0h1Z6MWfvxe68vBlk9WSLe71lq1 =jeiK -----END PGP SIGNATURE-----