on master help sign in
Update the readme

Also adds the note to ‘DESIGN.md’ stating that it's no longer being updated.

commit096c8d7f635c75307df57c43d0a259479c014c40 authormrkkrp <mark.karpov@tweag.io> dateFri 4 Oct 2019, 11:30 (7 years ago) parent480d6ed
2 files changed+17−18
DESIGN.md+3 README.md+14−18
DESIGN.md+3
@@ -1,5 +1,8 @@
11# Ormolu
22
3+*This document represents our discussions and plans at early stages of
4+development, it is no longer being updated.*
5+
36* [Analysis of the existing solutions](#analysis-of-the-existing-solutions)
47 * [Brittany](#brittany)
58 * [Hindent](#hindent)
README.md+14−18
@@ -11,20 +11,19 @@ the following goals in mind:
1111
1212* Using GHC's own parser to avoid parsing problems caused by
1313 [`haskell-src-exts`][haskell-src-exts].
14−* Let some whitespace be programmable. The layout of the input
15− influence the layout choices in the output. This means that the
16− choices between single-line/multi-line layouts in each particular
17− situation are made by the user, not by an algorithm. This makes the
18− implementation simpler and leaves some control to the user while
19− still guaranteeing that the formatted code is stylistically
20− consistent.
21−* Writing code in such a way so it's easy to modify and maintain. Roughly,
22− it means that the project follows the path of [`hindent`][hindent] and is
23− very much about printing AST in a particular way.
14+* Let some whitespace be programmable. The layout of the input influences
15+ the layout choices in the output. This means that the choices between
16+ single-line/multi-line layouts in each particular situation are made by
17+ the user, not by an algorithm. This makes the implementation simpler and
18+ leaves some control to the user while still guaranteeing that the
19+ formatted code is stylistically consistent.
20+* Writing code in such a way so it's easy to modify and maintain.
2421* Implementing one “true” formatting style which admits no configuration.
2522* That formatting style aims to result in minimal diffs while still
2623 remaining very close to “conventional” Haskell formatting people use.
27−* Idempotency: formatting already formatted code doesn't change it.
24+* Choose a style compatible with modern dialects of Haskell. As new Haskell
25+ extensions enter broad use, we may change the style to accomodate them.
26+* Idempotence: formatting already formatted code doesn't change it.
2827* Be well-tested and robust to the point that it can be used in large
2928 projects without exposing unfortunate, disappointing bugs here and there.
3029
@@ -53,7 +52,7 @@ packages:
5352$ stack build
5453```
5554
56−To use Ormolu directly from GitHub with nix, this snippet may come in handy:
55+To use Ormolu directly from GitHub with Nix, this snippet may come in handy:
5756
5857```nix
5958# This overlay adds Ormolu straight from GitHub.
@@ -96,10 +95,8 @@ $ ormolu --mode inplace Module.hs
9695
9796* Does not handle CPP (wontfix, see [the design document][design]).
9897* Input modules should be parsable by Haddock, which is a bit stricter
99− criterion than just being a valid Haskell modules.
100−* Various minor idempotence issues, most of them are related to comments †.
101−
102−† To be resolved in 0.0.2.0.
98+ criterion than just being valid Haskell modules.
99+* Various minor idempotence issues, most of them are related to comments.
103100
104101## Editor integration
105102
@@ -110,7 +107,7 @@ We know of the following editor integrations:
110107## Running on Hackage
111108
112109It's possible to try Ormolu on arbitrary packages from Hackage. For that
113−execute (from root of cloned repo):
110+execute (from the root of the cloned repo):
114111
115112```console
116113$ nix-build -A hackage.<package>
@@ -133,5 +130,4 @@ Copyright © 2018–present Tweag I/O
133130
134131[design]: ./DESIGN.md#cpp
135132[haskell-src-exts]: https://hackage.haskell.org/package/haskell-src-exts
136−[hindent]: https://hackage.haskell.org/package/hindent
137133[emacs-package]: https://github.com/vyorkin/ormolu.el