ocaml-doc / doc-ock

(DEPRECATED) Documentation generation for OCaml
ISC License
15 stars 5 forks source link

Is module substitution with signatures possible? #53

Open dsheets opened 8 years ago

dsheets commented 8 years ago

https://github.com/lpw25/doc-ock/blob/master/src/docOckTypes.mli#L166

implies that you can substitute a module with a signature but I don't believe this is possible. I think only substitution of module paths (aliases) is supported. When can you substitute a signature? Also, I think this eliminates the need for a Module.Equation module.

lpw25 commented 8 years ago

Sorry, I've got a bit ahead of myself with that one. Allowing substitution for any equation (which for modules includes signatures) is what OCaml should support as it is the correct thing to do from a theoretical perspective. However, as you say, only module paths can be used at the moment. I would prefer to leave things as they are in doc-ock because it makes things consistent between module substitutions and type substitutions, but if it is causing you too many issues (i.e. it requires more than just a couple of assert falses) then I'm happy to fix it.