on master help sign in
Various fixes, thanks to Facundo

[skip ci]

commit50fd9c7759920ada81ee7c43d4a8c5c163b5ee12 authorMark Karpov <markkarpov92@gmail.com> dateFri 10 May 2019, 18:53 (7 years ago) parent5dcee95
1 file changed+9−10
README.md+9−10
README.md+9−10
@@ -11,11 +11,11 @@ the following features in mind:
1111 it means that the project follows the path of [`hindent`][hindent] and is
1212 very much about printing AST in a particular way.
1313* Implementing one “true” formatting style which admits no configuration.
14−* Let layout of input source code control layout choices in output. This
15− means that the choices between single-line/multi-line layouts in each
16− particular situation are made by user, not by an algorithm. This makes the
17− implementation simpler and leaves just enough control to the user while
18− still guaranteeing that the formatted code is stylistically consistent.
14+* Let the layout of the input influence the layout choices in the output.
15+ This means that the choices between single-line/multi-line layouts in each
16+ particular situation are made by the user, not by an algorithm. This makes
17+ the implementation simpler and leaves some control to the user while still
18+ guaranteeing that the formatted code is stylistically consistent.
1919* Idempotency: formatting already formatted code doesn't change it.
2020* Be well-tested and robust to the point that it can be used in large
2121 projects without exposing unfortunate, disappointing bugs here and there.
@@ -45,16 +45,15 @@ Right now there are two options for people who want to contribute:
4545The `Ormolu.Printer.Combinators` module provides a DSL for rendering of GHC
4646AST. You'll probably only need this one module for writing new rendering
4747functions. The module documents how to use the printing combinators it
48−provides, consult the Haddocks to learn more about that.
48+provides. Consult the Haddocks to learn more about them.
4949
5050Create new modules corresponding to the things you want to render under
5151`Ormolu.Printer.Meat`. For example, there are `Ormolu.Printer.Meat.Type` and
5252`Ormolu.Printer.Meat.Declaration.Data`.
5353
54−Concrete rendering functions get their names by appending `p_` to record
55−field name which contains the part of AST of interest. For example, types
56−are often found in fields named `hsType`, so the function for rendering
57−types is correspondingly:
54+Concrete rendering functions get their names by appending `p_` to the name
55+of the type which describes a particular part of AST. For example, the
56+function for rendering types is correspondingly:
5857
5958```haskell
6059p_hsType :: HsType GhcPs -> R ()