OCaml rocks! and few announcements

OCaml rocks! and few announcements

I am finally ready to announce the creation of OCaml rocks!

It is a new blog for sharing coding experience, new ideas on automation and to make introductions on interesting projects - personal or from anywhere in the community. And while on the subject, there you will also find information about two projects that recently landed on opam:


Sugar is a monadic library to help you build an error handling layer. It unifies many uses for error aware expressions and integrates well with theading libraries. A proper introduction on the library can be found here. Its documentation is online, but you can also read a beginner friendly intro on the subject.


Dryunit is a detection tool for traditional testing. It started as a PPX, but after a while the project was simplified to be just a command line. Writing the extension was an interesting learning process though.

Tests are detected with the helper of OCaml parser and preprocessed test suites are cached to avoid performance penalties. Calling an extra shell for each test file might seem unnecessary, but that leaves you free to implement tests using any feature in OCaml, writing tests anyway you want. An introduction can be found here.

Feedback and suggestions for future posts are welcome!


Cool! Is this on the Planet OCaml aggregated feed? Would be very convenient!

Not yet, but I plan on doing it.

A clarification on the unit testing post:

The situation gets worse if you add many tests at once and forget one of the correspondent bootstrap entries. That test will never run and the compiler won’t even warn you about it.

If you create an .mli file for each .ml and have warning 32 enabled (which jbuilder does by default when the --dev flag is in use) you will get a warning for unused definitions. In the case of an executable the .mli would generally be empty, so anything not used internally by your test suite will cause a warning/error when warning 32 is enabled.

1 Like

Nice, I did not know that. I will probably add this bit of information as a side note.

@hcarty, if you find anything else on a specific post that needs fixing or you simply disagree, you are welcome to let me know using the post’s comment section.

Ah, I didn’t notice that there was a comment section! One of my browser extensions is blocking it I think.

1 Like

Awesome! Both sound like useful releases, too.

1 Like