[Ecls-list] [BUG] defmacro and &environment

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sun Nov 29 16:26:43 UTC 2009


The bug is not in defmacro, but in the compiler macro for TYPEP!

Juanjo

On Sun, Nov 29, 2009 at 3:41 PM, Tobias C. Rittweiler <tcr at freebits.de> wrote:
>
> In a file foo.lisp:
>
>  (defmacro m (x &environment e)
>     (if (typep x 'foo e)
>         :FOO
>         :BAR))
>
> ECL (Embeddable Common-Lisp) 9.12.1
> Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
> Copyright (C) 1993 Giuseppe Attardi
> Copyright (C) 2000 Juan J. Garcia-Ripoll
> ECL is free software, and you are welcome to redistribute it
> under certain conditions; see file 'Copyright' for details.
> Type :h for Help.
> Top level.
>> (compile-file "foo.lisp")
>
> ;;; Loading #P"/home/tcr/software/ecl-cvs/lib/ecl-9.12.1/cmp.fas"
> ;;; Loading #P"/home/tcr/software/ecl-cvs/lib/ecl-9.12.1/sysfun.lsp"
> ;;; Compiling foo.lisp.
> ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
> ;;; Compiling (DEFMACRO M ...).
> ;;; Error: in file /tmp/foo.lisp, position 358, and form
> ;;;   (FSET 'M #'(LAMBDA-BLOCK M # ...) ...)
> ;;; The macro form (TYPEP X 'FOO E) was not expanded successfully.
> ;;; Error detected:
> ;;; Too many arguments supplied to a macro or a destructuring-bind form.
> NIL
> T
> T
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>



-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list