[CM] Error error

chohag at jtan.com chohag at jtan.com
Tue Apr 21 06:39:08 PDT 2026


I don't know how I manage to keep butting up against these.

(define (fail)
        (define E (catch #t
                (lambda () (error 'foo "bar"))
                (lambda E E)))
        (format #t "WANT ~A\n" E)
        ; this is not the direct cause, eg. it has been (= (length E) 42)
        (eq? E 42)
        (format #t "GOT ~A\n" E))

(fail)

Output:

WANT (foo ("bar"))
GOT (foo (42))

I've stripped that back about as far as I can. I'm not sure if E
actually contains the butchered value or it's a hitch-hiker's quantum
effect where observing the answer changes it to something
incomprehensible, however it doesn't seem to be caused by format
this time as this 42 ends up as the argument to exit:

(define (fail)
        (define E (catch #t
                (lambda () (error 'foo "bar"))
                (lambda E E)))
        (eq? E 42)
        E)

(exit (caadr (fail)))

Matthew



More information about the Cmdist mailing list