Open Lazerbeak12345 opened 1 year ago
I think that would be great. Adding a rackcheck-typed
package to this repository would be the way to go. That way, rackcheck-lib
won't have to depend on typed-racket
for the folks that don't use typed racket.
Ok, so I started work on this then discovered that since part of the public api relies on racket/stream
(which has not yet been typed) that library will have to be typed first. https://github.com/racket/typed-racket/issues/970
I've started work on typing that upstream thing. Feel free to leave feedback lol.
Me and several other discord users talked about this in the racket discord. https://discord.com/channels/571040468092321801/993032505127088209/1070776863900844102
I'll just use the Sequenceof
type in place of Streamof
for now.
I've determined that this typed api might not be very useful, due to severe limitations of typed/racket
.
Without looking at tools outside of the core
package (which may prove useful), it is impossible to add type parameters to structs defined in untyped racket (currently). There doesn't seem to be any plan to change this - and since your great API makes use of structs in the way it does, I would normally just parameterize the type.
I'll be taking a step back from this for now. Perhaps I'll come up with another approach.
No worries and thanks for trying! Sorry I couldn't be of more help, but I don't really use typed racket.
I was thinking about adding
typed/racket
support to this library. There's a lot of ways to do this. Here's some ways that look simple enough to me.rackcheck-lib
calledtyped
and re-export everything fromrackcheck
.rackcheck-typed
Alternatively (or even in parallel?), one could gradually type the library and get it to work that way.
What do you think?