Contributions to lambdapi
are very welcome!
Here are some guidelines for contributing to this project.
For contributing to the User Manual, see docs/README.md
.
The Github repo has a branch for each release and the master
branch
for the development of the next release.
Contributions to Lambdapi should be done by using pull-requests on Github. You should first clone Lambdapi on Github, create a branch for your contribution, push it and, then, make a pull-request from the Github web interface. Pull-requests are then reviewed, commented and eventually merged.
- If the file structure is changed,
docs/structure.rst
should be changed as well. - Important contributions should update the file
CHANGES.md
.
In the interest of code source uniformity, we ask that:
- the tabulation character should be banned,
- one indentation unit is equal to two spaces,
- there should be no trailing spaces at the end of lines,
- line length should be limited to 78 characters excluding newline
(except for
@see
commands forocamldoc
).
You should at the very least run make sanity_check
before committing
anything. The script tools/git_hook_helper.sh
helps setting up a
git hook to run make sanity_check
automatically before each
commit. It is encouraged to set up such a hook. The script may be
called with the -b
option to include compilation in the hook.
Please check that you have GNU awk (gawk) installed or another UTF-8
compatible implementation of the AWK programming language interpreter.
For OCaml identifiers, we use the snake_case naming convention.
In Lambdapi files, objects should start with a lowercase letter while types should start with an uppercase letter.
Lambdapi does not use interface (or .mli
) files. However, every function
should be documented with its type, and an ocamldoc
comment. We ask that
the type of a function is given with the following syntax:
(** [a_function x y z] does some things with [x], [y] and [z]. *)
let a_function : int -> (bool -> bool) -> string -> unit = fun x y z ->
...
When changing the syntax of Lambdapi, make sure to update the
following files: src/core/lpLexer.ml
, src/core/lpParser.mly
,
src/core/pretty.ml
, src/core/print.ml
,
editors/emacs/lambdapi-smie.el
,
editors/vscode/lp.configuration.json
(shortcuts),
editors/vscode/syntaxes/lp.tmLanguage.json
(syntax highlighting),
tools/listings.tex
, docs/Makefile
(generation of
docs/syntax.bnf
), as well as the User Manual in the docs/
repository.