Three bugs
My new test cases for the sort operator pointed to three new bugs in my code. A small one with the sort optimisation, and two more in older code. The latter two where annoying enough to take me the whole day to fix. I was a bit astonished that I didn't see them (or at least one of them) earlier. My brain might have been in deeper hibernation during the Christmas season than I thought. Anyway, it is waking up again since I am starting (hopefully finishing too) to find and fix the left-over bugs.
The sort operator currently only works on lists, which is very limited. Tomorrow, I will modify it to work on bags and sets too. After that, I will try to profile my code for gross inefficiencies (to do this, I have to write a database-less version, because the database modules requires threads that are not supported by the O'Caml profiler).