racket / htdp

Other
92 stars 70 forks source link

check-with poor message when initial model is bad #123

Closed maueroats closed 3 years ago

maueroats commented 3 years ago

Racket 7.9 [bc] (also observed with 7.8) Language level: Intermediate Student with Lambda

(require 2htdp/image)
(require 2htdp/universe)

(define (trivial x)
  (overlay x (empty-scene 300 200)))

(big-bang (circle 10 "solid" "blue")
  (check-with number?)
  (on-draw trivial))

Expected result: something like error: big-bang was invoked with (circle 10 "solid" "blue") which fails to pass the check-with number? test

Actual result:

ok-fmt: undefined;
 cannot use field before initialization

Obviously not what you want for beginners. The error used to be better (as described above).

mfelleisen commented 3 years ago

Thanks. Fixed.