racket / htdp

Other
91 stars 69 forks source link

Expose image=? from BSL #164

Open jestarray opened 2 years ago

jestarray commented 2 years ago

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?
mfelleisen commented 2 years ago

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
rfindler commented 2 years ago

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.

jestarray commented 2 years ago

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.

rfindler commented 2 years ago

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