Update README.md and commandline description

pull/132/head
Lennart Spitzner 2018-03-25 16:06:36 +02:00
parent 3b20d0275e
commit 8cabd08477
2 changed files with 9 additions and 8 deletions

View File

@ -8,13 +8,12 @@ haskell source code formatter
This project's goals roughly are to:
- Always retain the semantics of the source being transformed;
- Be idempotent (this also directly ensures that only valid haskell is
produced);
- Be idempotent;
- Support the full GHC-haskell syntax including syntactic extensions
(but excluding `-XCPP` which is too hard);
- Retain newlines and comments unmodified;
- Be clever about using the available horizontal space while not overflowing
it if it cannot be avoided;
the column maximum if it cannot be avoided;
- Be clever about aligning things horizontally (this can be turned off
completely however);
- Have linear complexity in the size of the input.
@ -27,8 +26,9 @@ size of the input (although the constant factor is not small). See
But brittany is not finished yet, and there are some open issues that yet
require fixing:
- **only type-signatures and function/value bindings** are processed;
other module elements (data-decls, classes, instances, imports/exports etc.)
- **only the module header (imports/exports), type-signatures and
function/value bindings** are processed;
other module elements (data-decls, classes, instances, etc.)
are not transformed in any way; this extends to e.g. **bindings inside class
instance definitions** - they **won't be touched** (yet).
- By using `ghc-exactprint` as the parser, brittany supports full GHC
@ -47,7 +47,7 @@ require fixing:
You can [paste haskell code over here](https://hexagoxel.de/brittany/)
to test how it gets formatted by brittany. (Rg. privacy: the server does
log the size of the input, but _not_ the full requests.)
log the size of the input, but _not_ the full input/output of requests.)
# Other usage notes

View File

@ -63,7 +63,8 @@ helpDoc = PP.vcat $ List.intersperse
(PP.text "")
[ parDocW
[ "Reformats one or more haskell modules."
, "Currently affects only type signatures and function bindings;"
, "Currently affects only the module head (imports/exports), type"
, "signatures and function bindings;"
, "everything else is left unmodified."
, "Based on ghc-exactprint, thus (theoretically) supporting all"
, "that ghc does."
@ -71,7 +72,7 @@ helpDoc = PP.vcat $ List.intersperse
, parDoc $ "Example invocations:"
, PP.hang (PP.text "") 2 $ PP.vcat
[ PP.text "brittany"
, PP.hang (PP.text " ") 2 $ PP.text "read from stdin, output to stdout"
, PP.nest 2 $ PP.text "read from stdin, output to stdout"
]
, PP.hang (PP.text "") 2 $ PP.vcat
[ PP.text "brittany --indent=4 --write-mode=inplace *.hs"