
Couldn’t that macro be a function?

You know what I guess it could :stuck_out_tongue: tired and overthinking it. I guess at first I was wondering if there was a more contract-y way I should be doing it

My memory fails: Was flip-x and flip-y ever added? https://github.com/racket/pict/issues/29

Do you need complex? also? (define (true-number? n)
(or (rational? n)
(complex? n)))

I think I was using something like scale –1 1 or scale 1 –1 but can’t remember whether that works for the bounding box

oh that’s actually in the comments!

Oops - isn’t complex?
a superset of rational?
?

Bah, never mind (complex? +inf.0+1i)
=> #t

FWIW there were a bug in my code that @notjack found. But what was it…

Something about nested uses, I think.

Good point. In my case real is enough.

It seems like it would make sense for struct-guard/c
to have an optional #:parent
argument.

Even better, if the subtype struct would just automatically use the parent’s guard contract for the arguments that set the inherited elements, and its own for the rest.

But maybe that gets too complicated for cases where you want to override the parent’s guard (to make it more strict, for example)

IIUC, the parent’s guard will always be used, but it will report errors in terms of the parent type, rather than the child. (I’m sure there’s room for improvement in struct-guard/c
!)

Re @mflatt “Even a minimal Racket build should at least include base
and racket-lib
packages.”
I remember seeing sometime in the last few months that this is not always the case. I’ll see if I can find what I wrote at the time, but I believe it some of the distributed versions had no packages. Certainly building from the racket/src
directory (essentially what Guix’s racket-minimal
package now does) does not install any packages, which is why I could work around the lock issue by deleting the share/racket/pkgs
directory, as I wrote in <https://github.com/racket/racket/issues/3851#issuecomment-929793167>.

I see. By “minimal Racket”, I had in mind a distribution like the one called “minimal” on the download page, But now I see that the non-Windows build instructions stop at something even less than that, since the racket-lib
package is not installed by the end of make install
.

I’m not immediately sure whether the solution is to fully accommodate yet another configuration (smaller than “minimal”) or adjust the build instructions/targets. I’ll take another look tomorrow.