Fix "Failure tl" when writing an empty module
With the following code:
module M = struct end
The compiler throws (Failure tl) as an exception. It's very annoying, especially for LSP users, to get crashes whenever they try to write a module until there is at least one item in them.
Acceptance criteria
- Empty modules don't crash the compiler (and the language server).
- Tests added.