Yeah people keep hitting this:
- https://stackoverflow.com/q/22348341/20371
- https://stackoverflow.com/q/3238509/20371
- Avoiding duplicated definitions in module implementation and interface
There are a couple of tricks you can use to work around it in some situatuons.You already discovered the ‘top-down development’ trick, there’s also a ‘recursive modules’ trick which works for modules that contain only type definitions (and also external definitions): https://blog.janestreet.com/a-trick-recursive-modules-from-recursive-signatures/ . This one actually also works with a single module.