How to contribute
The source code adheres to standards that keep it uniform and demonstrate (what we beleive to be) good programming practice. We kindly ask that all contributions to the repository follow the established pattern, and follow these guidelines:
- The name of the language should also be a valid OCaml module name.
- The language source code for language
langresides insrc/lang. - If the language is an extension of
langwith featureX, call itlang_X. - Language
langshould have a filesrc/lang/example.langwhich shows how it is used. - Language
langshould have a filesrc/lang/README.mdwhich explains briefly what the language is about. You can also put examples in this file, but note that the web page will already link tosrc/lang/example.langso there is no point in just copying that to theREADME.mdfile. - Instead of making one language with many features, make several languages each demonstrating a feature.
- Use interfaces
.mlifiles and comment all entries in the interface using the ocamldoc format(** ... *). -
The main program should use the
Zoo.Mainfunctor:module MyLanguage = Zoo.Main(struct .... end) ;; MyLanguage.main() ;;This will give your language line-editing capabilities (if
rlwrapis installed) and a uniform user interface. - Do not use
opento open modules, there are better solutions (the best one is to just not look for any shortcuts).
Remember: these are guidelines that can be broken for a good enough reason.