Another example from http://www.cliki.net/diff

In the diff.lisp file,


(defmacro do-file-lines ((line-var pathname-var &optional result) &body body)
  (let ((stream-var (gensym)))
    `(with-open-file (,stream-var ,pathname-var :direction :input
                      :element-type 'character)
      (do-stream-lines (,line-var ,stream-var ,result)
        ,@body))))


(defun diff::intern-files (&rest files)
  (let ((interner (diff::make-interner))
        (interned-files nil))
    (dolist (file files (values interner (nreverse interned-files)))
      (let ((interned-file nil))
        (diff::do-file-lines (line file)
          (let ((code (diff::intern-string interner line)))
            (push code interned-file)))
        (push (coerce (nreverse interned-file) 'simple-vector) 
interned-files)))))


The compiled code refuses to run, presumably choking at the macro expansion 
above.

If I eval the lower diff::intern-files by c-x c-e, the code runs fine.






Sent from Windows Mail
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to