htdp icon indicating copy to clipboard operation
htdp copied to clipboard

Expose image=? from BSL

Open jestarray opened this issue 4 years ago • 4 comments

I was looking for image=? in 2htdp/image but couldn't find it until Alex Knauth mentioned its in BSL but not exposed, is there a reason why its not exposed to the library.

(require lang/imageeq) ;it can be required here
(require 2htdp/image)

but if you need both 2htdp/image and image=? , then it leads to:

. module: identifier already required
  also provided by: lang/imageeq in: image?

jestarray avatar Dec 16 '21 03:12 jestarray

What do you mean by expoised?

Welcome to Racket v8.3.0.5 [cs].
> (require (only-in lang/htdp-beginner image=?))
> (require 2htdp/image)
> (image=? (rectangle 1 1 'solid 'red) (rectangle 1 1 'solid 'red))
#t

mfelleisen avatar Dec 16 '21 11:12 mfelleisen

You might also be able to get away with just using equal? if putting a prefix or a rename on the require isn't an option.

rfindler avatar Dec 16 '21 17:12 rfindler

What I mean is why isn't it just available from the package 2htdp/image? (require (only-in lang/htdp-beginner image=?)) works though so you can close this issue.

jestarray avatar Dec 16 '21 18:12 jestarray

I think it is because it is just equal? although the history here is not at my fingertips!

rfindler avatar Dec 16 '21 18:12 rfindler