Paste number 80286: here is what i think is happening

Paste number 80286: here is what i think is happening
Pasted by: lnostdal
When:1 year, 3 months ago
Share:Tweet this! | http://paste.lisp.org/+1PY6
Channel:None
Paste contents:
Raw Source | XML | Display As
(eval-when (:compile-toplevel :execute)
  (defmacro i-will-be-gone (x)
    `(write-line ,x)))


(declaim (inline test))
(defun test (x)
  (declare (optimize speed))
  (i-will-be-gone x))


(eval-when (:compile-toplevel :execute)
  (unintern 'i-will-be-gone))




CL-USER> (compile-file "/home/lnostdal/programming/lisp/temp/macro-fail")

; compiling file "/home/lnostdal/programming/lisp/temp/macro-fail.lisp" (written 15 MAY 2009 02:43:36 PM):
; compiling (DECLAIM (INLINE TEST))
; compiling (DEFUN TEST ...)

; /home/lnostdal/programming/lisp/temp/macro-fail.fasl written
; compilation finished in 0:00:00.009
#P"/home/lnostdal/programming/lisp/temp/macro-fail.fasl"
NIL
NIL
CL-USER> (load "/home/lnostdal/programming/lisp/temp/macro-fail")
T
CL-USER> (compile nil '(lambda () (test "hi")))
; in: LAMBDA NIL
;     (TEST "hi")
; --> BLOCK 
; ==>
;   (I-WILL-BE-GONE X)
; 
; caught STYLE-WARNING:
;   undefined function: I-WILL-BE-GONE
; 
; compilation unit finished
;   Undefined function:
;     I-WILL-BE-GONE
;   caught 1 STYLE-WARNING condition
#<FUNCTION (LAMBDA ()) {B385075}>
T
NIL
CL-USER> (test "hi") ;; but this works
hi
"hi"

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.