GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
BatCache should support functions like 'a -> 'b -> 'c and not just 'a -> 'b
'a -> 'b -> 'c
'a -> 'b
On a related note, batCache declares
let (|>) x f = f x
let tap f x = f x; x
edit: and so do a lot of other modules, actually.
Why not opening BatPervasives ? It doesn't help the second point of #332 if those things are redefined all over the place...
I think the reason for it was to reduce interdependencies between BatFoo modules, so they could be used independently without increasing executable size so much.
I thought as much, but I wonder whether Pervasives shouldn't be an exception to this approach.
Unfortunately, pervasives brings in all of BatIO, which is a huge chunk of code. Maybe factoring out the new stuff (like |>) from pervasives and putting it in an internal module would be helpful for allowing BatCache to depend on this much slimmer module.
I'm not sure it's worth it, but if anything, it seems the most sensible candidate for that would be the "Fundamental functions and operators" section.
True, this is a pretty small payback modification, but it's definitely something that will be more important in the hopeful future of OCaml with lots of smaller packages.
Okay; I'm opening another issue for that, since it affects several modules, not just BatCache.