@@ -1,8 +1,7 @@
1# Contributing
1# Contributing
3Issues (bugs, feature requests or otherwise feedback) may be reported in
3Issues (bugs, feature requests or otherwise feedback) may be reported in
4−[the GitHub issue tracker for this
4+[the GitHub issue tracker for this project][issues]. Pull requests are also
5−project](https://github.com/tweag/ormolu/issues). Pull requests are also
8When contributing to this repository, please first discuss the change you
7When contributing to this repository, please first discuss the change you
@@ -18,28 +17,6 @@ messages and PR descriptions.
19* [Fixing bugs][bugs]. This is the main focus right now.
18* [Fixing bugs][bugs]. This is the main focus right now.
21−## Implementing rendering of AST
23−The `Ormolu.Printer.Combinators` module provides a DSL for rendering of GHC
24−AST. You'll probably only need this one module for writing new rendering
25−functions. The module documents how to use the printing combinators it
26−provides. Consult the Haddocks to learn more about them.
28−Create new modules corresponding to the things you want to render under
29−`Ormolu.Printer.Meat`. For example, there are `Ormolu.Printer.Meat.Type` and
30−`Ormolu.Printer.Meat.Declaration.Data`.
32−Concrete rendering functions get their names by appending `p_` to the name
33−of the type which describes a particular part of AST. For example, the
34−function for rendering types is correspondingly:
37−p_hsType :: HsType GhcPs -> R ()
40−In general rendering functions like this take 1 or more arguments and
41−produce `R ()` which is a rendering action.
43### Testing
20### Testing
45Testing has been taken good care of and now it amounts to just adding
22Testing has been taken good care of and now it amounts to just adding
@@ -59,6 +36,9 @@ Testing is performed as following:
59Examples can be organized in sub-directories, see the existing ones for
36Examples can be organized in sub-directories, see the existing ones for
60inspiration.
37inspiration.
39+Please note that we try to keep individual files at most 25 lines long
40+because otherwise it's hard to figure out want went wrong when a test fails.
64We use Circle CI. Some outside contributors may have problems, as in, CI
44We use Circle CI. Some outside contributors may have problems, as in, CI
@@ -75,4 +55,5 @@ User settings -> Account integrations -> Refresh permissions
76in Circle CI app.
56in Circle CI app.
58+[issues]: https://github.com/tweag/ormolu/issues
78[bugs]: https://github.com/tweag/ormolu/issues?q=is%3Aissue+is%3Aopen+label%3Abug
59[bugs]: https://github.com/tweag/ormolu/issues?q=is%3Aissue+is%3Aopen+label%3Abug