Steel Bank Common Lisp

source form recorded for definitions at REPL is extremely verbose

Reported by Alastair Bridgewater on 2011-04-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

This is SBCL 1.0.47.7, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (defun foo (bar) (+ bar 2))

FOO
* (describe 'foo)

COMMON-LISP-USER::FOO
  [symbol]

FOO names a compiled function:
  Lambda-list: (BAR)
  Derived type: (FUNCTION (T) (VALUES NUMBER &OPTIONAL))
  Source form:
    (SB-INT:NAMED-LAMBDA (EVAL (DEFUN FOO))
        NIL
      (DECLARE (MUFFLE-CONDITIONS COMPILER-NOTE))
      (PROGN
       (SB-INT:NAMED-LAMBDA FOO
           (BAR)
         (BLOCK FOO (+ BAR 2)))))
*

Needless to say, the source form printed by DESCRIBE bears little resemblance to the original definition, and this gets worse when macros are involved. Surely the source form should be recorded pre-macroexpansion?

Nikodemus Siivola (nikodemus) wrote :

It's not so much pre-macroexpansion, but the fact that the thing that gets saved includes the lambda introduced by %SIMPLE-EVAL.

Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: New → In Progress
Nikodemus Siivola (nikodemus) wrote :

1.0.47.18.

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers