Commit Graph

416 Commits (e9aacb27ffcd1bdf350d59a56178688284cd4f8f)

Author SHA1 Message Date
Lennart Spitzner 8a401d291e Workaround for #68: trim exactprinted text for unknown nodes 2017-11-28 18:23:05 +01:00
Lennart Spitzner 6a97379b33 Add whitespace around operator in section, Fixes #67 2017-11-28 17:56:28 +01:00
Lennart Spitzner d9155e240d RecursiveDo: Add second layout, Respect IndentPolicyLeft 2017-11-27 23:13:13 +01:00
Lennart Spitzner 466ff237ff Add some comments/examples in layoutStmt 2017-11-27 23:05:47 +01:00
Lennart Spitzner 9e8571b848 Remove an unnecessary node in BriDoc construction; Add TODO 2017-11-27 23:01:32 +01:00
Evan Rutledge Borden f6859d184f Fix tests after rebase. 2017-11-27 13:05:04 -05:00
Evan Rutledge Borden e9a2de7a85 Filter binders with docSetBaseAndIndent. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden de0851f975 Use docAltFilter for consistency. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden 35f33c131c Remove duplication in 'let' expression layout. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden ba3d9ad739 Add tests for record construction. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden d7ac478fc6 Update type operator pending tests to remove context. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden 44e95940c0 Change record update syntax for left indent policy 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden a6bea7542b Update pending long operator use for left indent. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden d1e1984206 Update guard formatting for IndentPolicyLeft 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden f3c37a6abf Update pending long argument test to context free. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden cd9f7de566 Update pending type operator test for context free. 2017-11-27 18:12:19 +01:00
Evan Rutledge Borden a13a137f68 Add left indent support for statements
This aligns left indent style `let` statements with their expression
form.
2017-11-27 18:12:19 +01:00
Evan Rutledge Borden de5f0401f3 Add consistency between contsrained and unconstrained forall format
Constrained forall formats aligned the `.` to the left. Constrained
formats aligned the `.` to the right. This change adds consistency
between both formats.
2017-11-27 18:12:19 +01:00
Evan Rutledge Borden 3bbf81baab Add literate tests for context free formatting
Left indent combined with no columnized alignment represents a context
free formatting style for brittany. These tests allow this format to be
tested until inline formatting tools are available to make these files
less redundant.
2017-11-27 18:12:19 +01:00
Evan Rutledge Borden ce41178df5 Remove context sensitive let indentation when IndentPolicyLeft
Let expressions with multiple bindings automattically indent and pull
left

```
let
  a = b
  c = d
in foo bar baz
```

```
let
  a = b
  c = d
in
  foo bar baz
```

```
let
  a = b
  c = d
in foo
  bar
  baz
```

```
let
  a = b
  c = d
in
  foo
    bar
    baz
```
2017-11-27 18:12:19 +01:00
Evan Rutledge Borden bdf8769913 Remove 3 space special case from HsIf when IndentPolicyLeft
```
if foo
   bar
then
  baz
```

becomes

```
if foo
  bar
then
  baz
```
2017-11-27 18:12:19 +01:00
Lennart Spitzner 88cbaf813a Implement `IndentPolicyLeft` for one HsApp case 2017-11-27 18:12:19 +01:00
Lennart Spitzner 4568bd3553 Prepare implementation for `IndentPolicyLeft` 2017-11-27 18:12:19 +01:00
Lennart Spitzner fdd2f5f6dc Try fix shitty travis CI script again 2017-11-27 18:11:49 +01:00
Lennart Spitzner c709513209 Remove dependency on either package
Following the deprecation and removal of the EitherT transformer
2017-11-27 18:11:49 +01:00
Lennart Spitzner ea1720f95e Merge branch 'master' into dev 2017-11-25 19:09:13 +01:00
Lennart Spitzner 37436e675a
Update README.md: Mention stackage nightly, contribution, dev branch 2017-11-25 00:58:33 +01:00
Lennart Spitzner f46fcc135d Update doc/HCAR entry 2017-11-19 22:20:39 +01:00
Lennart Spitzner 26f8cdfb65 Support RecursiveDo/`rec` keyword 2017-10-24 00:25:59 +02:00
Lennart Spitzner 338beb8eea Move testcases for extensions in separate testfile 2017-10-24 00:15:53 +02:00
Lennart Spitzner ddd7c6b439 Fix some rare issue and add some comments
(it is so rare i cannot reproduce anymore right now,
because the code that caused it has changed since..)
2017-10-24 00:00:34 +02:00
Lennart Spitzner 585c345c35 Fix silently broken travis setup (rahhh) 2017-10-23 23:43:59 +02:00
Lennart Spitzner b1c6be7acd Fix parentheses around kind signatures, fixes #64 2017-10-15 00:23:14 +02:00
Lennart Spitzner f86665a251 Fix promoted HsTyVars on ghc-8.2.1
This fix does not work on ghc-8.0, because I do not understand
the 8.0 API in this instance. Could be resolved by looking
at annotations, but that really should not be necessary.
2017-10-14 23:21:13 +02:00
Lennart Spitzner 7d7ec3e8b4 Update commandline help output 2017-10-04 23:43:30 +02:00
Lennart Spitzner 45d5235724 Merge pull request #60 from d-dorazio/dev
Rework the cli interface (fixes #40)

- Remove `--inplace` flag and replace with `--write-mode=(display|inplace)`;
  default is "display".
- Remove `-i/--input` and `-o/--output` flags
2017-10-04 22:57:57 +02:00
d-dorazio 752048882e move inputParams into the reordered block 2017-10-04 20:56:37 +02:00
d-dorazio f21c6b6eac rework the cli interface 2017-10-03 23:32:36 +02:00
Lennart Spitzner a0112524aa Split up littests input into multiple files
*.blt instead of just tests.blt

yay for unix-style for ordering the inputs "15-regression.blt"
2017-10-02 20:53:56 +02:00
Lennart Spitzner bb40870f81 Merge pull request #59 from d-dorazio/master 2017-10-02 14:13:27 +02:00
d-dorazio 95c40f2b1e address review comments 2017-10-02 13:55:52 +02:00
Lennart Spitzner ccf2eb092f Support RecordWildCards, Add one-liner layouting for records
fixes #52
2017-10-01 17:24:13 +02:00
d-dorazio 36af16f881 add inplace flag 2017-10-01 17:04:20 +02:00
d-dorazio 308da71afb support multiple inputs and outputs 2017-10-01 17:04:20 +02:00
Lennart Spitzner 5a12b63035 Adapt travis script to improve build times 2017-09-29 21:42:39 +02:00
Lennart Spitzner a348ae7fbc Switch to XDG path for config; Search conf in parents
- switch to XDG path should be backwards-compatible:
  - new config will be written to XDG path
  - but existing config in ~/.brittany will be respected
- looks for "brittany.yaml" not only in cwd, but in parents too.
  uses the first file found.

fixes #45, fixes #55
2017-09-29 21:42:39 +02:00
Lennart Spitzner 8c6eb4d1e2 Update stack.yaml (butcher-1.1.0.2) 2017-09-26 23:45:56 +02:00
Lennart Spitzner 8438d4a03d Update README.md (ghc versions) 2017-09-26 23:45:56 +02:00
Lennart Spitzner 8ef7daece8 Add changelog entry for 0.8.0.3 2017-09-26 23:24:00 +02:00
Lennart Spitzner d1606932f8 Minor cleanup / performance improvement 2017-09-20 23:35:45 +02:00