Why do I need to repeat type declarations between interfaces and implementations (or how do I get around this)?

Yeah people keep hitting this:

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.

3 Likes