Commit Graph

35 Commits

Author SHA1 Message Date
Mark Karpov
145f7296f5 Preserve grouping of do statements 2020-04-16 20:41:36 +02:00
Mark Karpov
683cbeacf5
Version bump (0.0.4.0)
[skip ci]
2020-04-15 15:52:50 +02:00
Mark Karpov
9874ac7ce7
Some minor edits to the changelog
[skip ci]
2020-04-14 22:41:47 +02:00
Mark Karpov
d09429f6ec Format records with a single data constructor more compactly 2020-04-10 18:02:26 +02:00
Mark Karpov
d96f7e3e00 Do not lump together forall and constructors when deciding on layout 2020-04-10 14:37:15 +02:00
Mark Karpov
9b342488be Render type applications similar to value applications 2020-04-10 14:37:15 +02:00
Mark Karpov
9b7b6eb239 Fix rendering of arrow notation with multiline expressions 2020-04-10 12:42:05 +02:00
Mark Karpov
5acda489e8
Add the recent changes to the changelog
[skip ci]
2020-04-09 18:37:02 +02:00
Mark Karpov
ac719f3e99 Improve rendering of "where" in class declarations and such 2020-02-10 11:21:34 +01:00
Mark Karpov
84c2a53349 More compact rendering of type family injectivity constraints 2020-02-01 20:03:41 +01:00
Mark Karpov
a37765cbcb Make rendering of operator patterns consistent with other cases 2020-01-31 14:36:40 +01:00
Utku Demir
34dc1cba49 Don't give up on first failure when multiple files are given
Closes #502.
2020-01-30 13:43:59 +01:00
Mark Karpov
d1c7606cab
Version bump (0.0.3.1)
[skip ci]
2020-01-22 19:17:34 +01:00
Mark Karpov
ca8cb0474a
Add a mention of the issue 498 to the changelog
[skip ci]
2020-01-17 12:06:43 +01:00
Mark Karpov
3137345dc3
Version bump (0.0.3.0)
[skip ci]
2020-01-11 13:06:12 +01:00
Sridhar Ratnakumar
116fe842b4 Preserve newlines in class and instance declarations
Preserve user-added newlines with the following normalizations:

* No newlines below where
* Consecutive newlines are compressed into a single newline
* Always surround documented declarations with blank lines
2020-01-11 13:05:18 +01:00
Mark Karpov
6ee0365f2c Fix indentation in presence of type applications 2020-01-10 16:53:29 +01:00
Mark Karpov
1eefa97cc2 Do not hang record constructors
Previously we hanged record constructors but not record updates. It looks
like unlike other hanging constructions (lambdas, case expressions, and
do-blocks), record constructors and updates should rather be placed
normally. Indeed, when we stop hanging them, many constructions start to
look more reasonable and predictable (see the updated test cases).

Yet the change is not enough to fix the problem in general case: it is
enough to replace the record with a e.g. do-block to get the same failure.
To correct that we adjust what should fit in one line for hanging placement
to fire: now we consider the span between beginning of function and the
start of potentially-hanging construction.
2020-01-09 20:43:33 +01:00
Mark Karpov
f7dc5bb717
Mention support for record dot syntax in the changelog
[skip ci]
2020-01-07 16:38:57 +01:00
Mark Karpov
4e253c9eb2 Fix application of multi-way if to arguments 2020-01-06 16:06:39 +01:00
mrkkrp
0d0c94f7b1
Mention the fix for #473 in the changelog
[skip ci]
2019-12-03 11:12:10 +01:00
mrkkrp
46ede8aa35
Version bump (0.0.2.0)
[skip ci]
2019-11-29 17:40:05 +01:00
mrkkrp
23e859c8fe
Mention the fix for #444 in the changelog
[skip ci]
2019-11-29 17:38:14 +01:00
mrkkrp
5ca92059fb Take non-commutative nature of language pragmas into account
The order in which language pragmas are put in the input sometimes matters.
This is because some language extensions can enable other extensions, yet
the extensions coming later in the list have the ability to change it. So
here we classify all extensions by assigning one of the four groups to them.
Then we only sort inside of the groups.
2019-11-29 15:05:34 +01:00
mrkkrp
6e07126aca Handle stack headers correctly
More about the feature:

https://docs.haskellstack.org/en/stable/GUIDE/#script-interpreter
2019-11-28 12:17:15 +01:00
mrkkrp
39592b2e88 Implement correct handling of shebangs
Also: rename and document some functions we took from ‘ghc-exact-print’.
2019-11-21 17:52:07 +01:00
mrkkrp
524f8763f3 Insert comments between declarations and their preceding Haddocks
I originally thought it's a good idea to prevent this, but it looks like it
makes things arguably worse in certain cases even though the Haddocks end up
not associated with their declarations (but they are not associated with
them in the input either, so it's OK).
2019-11-19 13:24:11 +01:00
mrkkrp
15fd4090aa
Mention the issue 446 in the changelog 2019-11-17 12:21:52 +01:00
mrkkrp
2517d98ba1 Preserve empty ‘forall’s 2019-11-02 15:06:18 +01:00
mrkkrp
fa96da7d67 Restore ‘--ghc-opt’ options again, report unrecognized options
While migrating to ‘ghc-lib-parser’ we accidentally stopped taking into
account the ‘--ghc-opt’ options. This commit fixes that and makes sure we do
not ignore unrecognized GHC options.
2019-11-02 12:45:44 +01:00
Artyom Kazak
b08af17217 Migrate to ‘ghc-lib-parser’
This would let us have features from GHC 8.8.1 while still using GHC 8.6.5
from Nixpkgs. Bonus: Ormolu will be compilable with GHCJS.
2019-11-01 18:19:34 +01:00
mrkkrp
647e32299f Fix moving comments before module header into the export list 2019-11-01 18:12:05 +01:00
mrkkrp
c5c9962604
Add the fix for #420 to the changelog
[skip ci]
2019-10-27 13:49:20 +01:00
mrkkrp
07a6728c57
Add the fix for #408 the changelog
[skip ci]
2019-10-26 14:20:59 +02:00
mrkkrp
dc6605107a
Initial commit 2018-11-25 20:51:22 +07:00