"Bill Clementson" billclem@gmail.com writes:
I'm getting back into actual lisp development and I'm trying to install the common lisp music (clm) package using sbcl. I've gotten a compile error (in mus.lisp for those that are interested) that I'd like to figure out how to fix it, but I can't really find it since the error doesn't seem to provide line numbers for the error. Is there a way to get the line number that the error occured on printed?
Doesn't M-n take you to the error?
I may have spoke too soon with my last message. It does let me walk through the stack trace to find the error that the compiler had, but it doesn't tell me where the compiler is in the file that it is compiling. Now that I think about it, this seems to be problem in the compiler, rather than in the source file, but i'm new to actually using lisp so I could just be totally wrong. Here is a listing of the stack trace (just up to the call to compile file, the actual trace is 200+ deep):
CL-USER> (compile-file "mus.lisp")
0.0 can't be converted to type NIL. [Condition of type SIMPLE-TYPE-ERROR]
Restarts: 0: [ABORT] Return to sldb level 4. 1: [ABORT] Return to sldb level 3. 2: [ABORT] Return to sldb level 2. 3: [ABORT] Return to sldb level 1. 4: [ABORT-REQUEST] Abort handling SLIME request. 5: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {9A66E61}>)
Backtrace: 0: ((FLET SB-IMPL::COERCE-ERROR)) 1: (COERCE 0.0 NIL) 2: (SB-KERNEL::ROUND-NUMERIC-BOUND 0.0 FLOAT NIL T) 3: (SB-KERNEL::NUMBER-SIMPLE-INTERSECTION2-TYPE-METHOD #<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) 4: (SB-KERNEL::%TYPE-INTERSECTION2 #<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) 5: (SB-KERNEL:TYPE-INTERSECTION2 #<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) 6: (SB-KERNEL::SIMPLIFY-INTERSECTIONS (#<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>)) 7: (SB-KERNEL::%TYPE-INTERSECTION (#<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>)) 8: (SB-KERNEL::FIXED-VALUES-OP (#<SB-KERNEL:NUMERIC-TYPE NUMBER>) (#<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) #<SB-KERNEL:NAMED-TYPE T> #<FUNCTION SB-KERNEL:TYPE-INTERSECTION>) 9: (SB-KERNEL::ARGS-TYPE-OP #<SB-KERNEL:VALUES-TYPE (VALUES NUMBER &OPTIONAL)> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)> #<FUNCTION SB-KERNEL:TYPE-INTERSECTION> #<FUNCTION MAX>) 10: (SB-KERNEL::VALUES-TYPE-OP #<SB-KERNEL:VALUES-TYPE (VALUES NUMBER &OPTIONAL)> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)> #<FUNCTION SB-KERNEL:TYPE-INTERSECTION> #<FUNCTION MAX>) 11: (SB-KERNEL:VALUES-TYPE-INTERSECTION #<SB-KERNEL:VALUES-TYPE (VALUES NUMBER &OPTIONAL)> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)>) 12: (SB-C::DERIVE-NODE-TYPE #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME / :TYPE #<SB-KERNEL:FUN-TYPE #> :WHERE-FROM :DECLARED :KIND :GLOBAL-FUNCTION {9D8D141}> {9D92CD9}> :ARGS (#<SB-C::REF :LEAF # {9D92DB1}> #<SB-C::REF :LEAF # {9D92E49}>) {9D92D11}> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)>) 13: (SB-C::IR1-OPTIMIZE-COMBINATION #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME / :TYPE #<SB-KERNEL:FUN-TYPE #> :WHERE-FROM :DECLARED :KIND :GLOBAL-FUNCTION {9D8D141}> {9D92CD9}> :ARGS (#<SB-C::REF :LEAF # {9D92DB1}> #<SB-C::REF :LEAF # {9D92E49}>) {9D92D11}>) 14: (SB-C::IR1-OPTIMIZE-BLOCK #<SB-C::CBLOCK 7 :START c1 {9D890F9}>) 15: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}> NIL) 16: (SB-C::IR1-OPTIMIZE-UNTIL-DONE #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}>) 17: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}>) 18: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}>) 19: (SB-C::COMPILE-TOPLEVEL (#<SB-C::CLAMBDA :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (SB-C::TOP-LEVEL-FORM #) :KIND :TOPLEVEL :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)> :WHERE-FROM :DEFINED :VARS NIL {9D88541}>) NIL) 20: (SB-C::CONVERT-AND-MAYBE-COMPILE (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 (CLM::X) (BLOCK CLM::BES-I0 #)) NIL (QUOTE NIL)) (#1=(SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 # #) NIL (QUOTE NIL)) #2=(EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) #1#) (PROGN (EVAL-WHEN # #) #2#) SB-C::ORIGINAL-SOURCE-START 0 75)) 21: ((FLET SB-C::DEFAULT-PROCESSOR) (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 (CLM::X) (BLOCK CLM::BES-I0 #)) NIL (QUOTE NIL))) 22: (SB-C::PROCESS-TOPLEVEL-FORM (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 (CLM::X) (BLOCK CLM::BES-I0 #)) NIL (QUOTE NIL)) (#1=(EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #)) (PROGN (EVAL-WHEN # #) #1#) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 23: (SB-C::PROCESS-TOPLEVEL-PROGN ((SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 # #) NIL (QUOTE NIL))) (#1=(EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #)) (PROGN (EVAL-WHEN # #) #1#) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 24: (SB-C::PROCESS-TOPLEVEL-FORM (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 # #) NIL (QUOTE NIL))) ((PROGN (EVAL-WHEN # #) (EVAL-WHEN # #)) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 25: (SB-C::PROCESS-TOPLEVEL-PROGN ((EVAL-WHEN (:COMPILE-TOPLEVEL) (SB-C:%COMPILER-DEFUN # # T)) (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #))) ((PROGN (EVAL-WHEN # #) (EVAL-WHEN # #)) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 26: (SB-C::PROCESS-TOPLEVEL-FORM (PROGN (EVAL-WHEN (:COMPILE-TOPLEVEL) (SB-C:%COMPILER-DEFUN # # T)) (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #))) (SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 27: ((FLET SB-C::DEFAULT-PROCESSOR) (DEFUN CLM::BES-I0 (CLM::X) (IF (< # 3.75) (LET* # #) (LET* # #)))) 28: (SB-C::PROCESS-TOPLEVEL-FORM (DEFUN CLM::BES-I0 (CLM::X) (IF (< # 3.75) (LET* # #) (LET* # #))) (SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 29: (SB-C::SUB-SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >) 30: ((LAMBDA NIL)) 31: (SB-C::%WITH-COMPILATION-UNIT #<CLOSURE (LAMBDA NIL) {A3C2CB5}>) 32: (SB-C::SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >) 33: (COMPILE-FILE "mus.lisp")