[CM] problem while executing loop.cm from .. Metalevel

Fitzpatrick, Denis F fitzpatrickd@boystown.org
Sun, 27 May 2007 14:07:48 -0500


When I evaluate the following (from loop.cm in Notes from the Metalevel)

(loop for i below 4
      for j from 100 by -10
      for k = (random 100)
      collect (list i j k))

I get the following error message and backtrace:
(apparently doesn't like the negative)


The value -10
is not of type
  (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) (RATIONAL (0))).
   [Condition of type TYPE-ERROR]

Restarts:
  0: [ABORT-REQUEST] Abort handling SLIME request.
  1: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (SB-C::%COMPILE-TIME-TYPE-ERROR (-10) (OR (SINGLE-FLOAT (0.0))
(DOUBLE-FLOAT (0.0d0)) (RATIONAL (0))) #<unavailable argument>)
  1: (NIL)
  2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LOOP FOR I BELOW 4 FOR J FROM 100 BY ...)
#<NULL-LEXENV>)
  3: ((LAMBDA ()))
  4: ((LAMBDA (SWANK-BACKEND::FN)) #<CLOSURE (LAMBDA #) {12BBAC35}>)
  5: (SWANK::CALL-WITH-BUFFER-SYNTAX #<CLOSURE (LAMBDA #) {12BBAC35}>)
  6: (SB-INT:SIMPLE-EVAL-IN-LEXENV
      (SWANK:INTERACTIVE-EVAL "(loop for i below 4
           for j from 100 by -10
           for k = (random 100)
           collect (list i j k))
     ")
      #<NULL-LEXENV>)
  7: ((LAMBDA ()))
  8: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION
SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {12BBAAD5}>)
  9: ((LAMBDA ()))
 10: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION
SWANK:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA #) {117BAA5D}>)
 11: (SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {124C0289}>
#<CLOSURE (LAMBDA #) {12BB7A1D}>)
 12: (SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {124C0289}> #<FUNCTION
(LAMBDA #) {117BAA5D}>)
 13: (SWANK::HANDLE-REQUEST #<SWANK::CONNECTION {124C0289}>)
 14: (SWANK::PROCESS-AVAILABLE-INPUT #<SB-SYS:FD-STREAM for "a constant
string" {124BF2F9}> #<CLOSURE (LAMBDA #) {12BB7A05}>)
 15: ((FLET SWANK::HANDLER))
 16: ((LAMBDA (SWANK-BACKEND::_)) #<unused argument>)
 17: (SB-IMPL::SUB-SERVE-EVENT NIL 0)
 18: (SB-SYS:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL)
 19: (SB-IMPL::REFILL-BUFFER/FD #<SB-SYS:FD-STREAM for "standard input"
{115D8709}>)
 20: (SB-IMPL::INPUT-CHAR/UTF-8 #<SB-SYS:FD-STREAM for "standard input"
{115D8709}> NIL #:EOF-OBJECT)
 21: (READ-CHAR #<SB-SYS:FD-STREAM for "standard input" {115D8709}> NIL
#:EOF-OBJECT #<unused argument>)
 22: (READ-CHAR #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {100CADA1}> NIL
#:EOF-OBJECT #<unused argument>)
 23: (READ-PRESERVING-WHITESPACE #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN*
{100CADA1}> NIL (NIL) T)
 24: (READ-PRESERVING-WHITESPACE #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN*
{100CADA1}> NIL (NIL) NIL)
 25: (READ #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {100CADA1}> NIL (NIL) NIL)
 26: (SB-IMPL::REPL-READ-FORM-FUN #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN*
{100CADA1}> #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDOUT* {10123229}>)
 27: (SB-IMPL::REPL-FUN NIL)
 28: ((LAMBDA ()))
 29: ((LAMBDA ()))
 30: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {116CFC65}>)
 31: (SB-IMPL::TOPLEVEL-REPL NIL)
 32: (SB-IMPL::TOPLEVEL-INIT)
 33: ((LABELS SB-IMPL::RESTART-LISP))