-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Bastet #255
Update to Bastet #255
Conversation
Ah yeah, I was messing around with tests, mostly to see how it affected the output JS, separate from the Bastet change. The O(1) Labs folks seem to use the "structural typeclass" approach in their modular-explicits PR, and I kind of like it, but I can revert the tests if you prefer. |
I'd personally prefer to keep those explicit instance modules, even in the tests, mainly because that's how the library is setup, and I'd like for there to be consistency. I also prefer to have the explicit declaration that a set of types and functions was intended to implement a typeclass, for both the compiler to check and for readers/users of the code. I think there's probably something to the idea of having inferred typeclass instances, but I think it also brings about some issues and inconsistencies, and don't want to move in that direction for the library as it is structured now. Maybe that's a "relude v2" type of thing, or a greenfield standard library, that takes a different approach. I think there is historical precedent for having explicit modules too, so I don't think having them is non-idiomatic Ocaml. We can discuss more, but I'd like to keep things consistent. E.g. if we want to rename something, add interfaces, restructure things, etc. I'd like to do it consistently. If any of these things means a big refactor/restructure of the library, I'd like to make a concerted effort to make the change across the board. I will promise that if I'm ever tempted to do a big restructure, I will open a discussion about it first. (Not saying that you did anything wrong, just that I will commit to discussion/collaboration for any big changes in the future, as I'm requesting here.) |
This reverts to explicit modules/signatures in test, and it further bumps |
Cool - thanks for bringing those instance things back. I didn't want that to hold you back, but thanks for making the change anyway. I'll try it out on nixos - I guess the question is where that comes into play with the |
My understanding is that Bastet only really needs the PPX as a dev tool (and shouldn't actually run it in our case), but that Bucklescript doesn't yet have the concept of a dev ppx, so it still needs to be included as a real dependency. This means the ppx will end up in downstream If it doesn't give you too much trouble, I feel pretty ready to merge and release this. |
Yeah, it only matters if something tries to run it, like a |
Feel free to merge whenever you're ready - I can figure out any nix issues later. |
I just pointed some of our relude-adjascent projects (relude-parse, bs-decode, relude-eon) at this PR and ran their tests, and there were no hiccups, so I'm going to merge and release this thing (followed by the others). |
bs-platform
to 7.2.2bs-abstract
tobs-bastet@1.2.3
BsAbstract
references toBsBastet
(I tried to factor out repeatedBsAbstract.Interface.
intoopen
s in cases where it didn't conflict with anything)Extensions.*
modules that re-aliasedordering
, and now they just use the definition fromBsBastet.Interface
instead (which is technically a breaking change)This PR doesn't (yet) build on native, but at this point it should just be a matter of splitting the JS-specific stuff into its own separate library. Also, it might be worth waiting for Risto-Stevcev/bastet#26 to be fixed, as currently the branch doesn't build unless you manually install
bisect_ppx
.