1## Ormolu 0.4.0.0 2 3* When a guard is located on its own line, the body associated with this 4 guard is indented by one extra level, so that it can easily be 5 distinguished from the guard predicate or pattern. [Issue 6 806](https://github.com/tweag/ormolu/issues/806). 7 8* Now a space is forced after `--` in line comments. [Issue 9 808](https://github.com/tweag/ormolu/issues/808). 10 11* Allow formatting Backpack signature files (`.hsig`). The switch between 12 regular module mode and signature mode is based on the file extension by 13 default, but can be overridden with the `-t / --source-type` command line 14 option. [Issue 600](https://github.com/tweag/ormolu/issues/600). 15 16* Blank Haddock comments are now eliminated. This also fixes issues with 17 differing ASTs in some special cases. [Issue 18 726](https://github.com/tweag/ormolu/issues/726). 19 20* Rewrite rules that are never active are now formatted correctly. 21 [Issue 823](https://github.com/tweag/ormolu/issues/823). 22 23* Promoted infix data constructors are now formatted correctly. [Issue 768]( 24 https://github.com/tweag/ormolu/issues/768). 25 26* Switched to `ghc-lib-parser-9.2`. 27 [Issue 794](https://github.com/tweag/ormolu/issues/794). 28 * Support for the new syntax-related language extensions: 29 `OverloadedRecordDot` and `OverloadedRecordUpdate` 30 (disabled by default). 31 [Issue 709](https://github.com/tweag/ormolu/issues/709). 32 * Removed support for `record-dot-preprocessor`. For the getter syntax, 33 consider using `OverloadedRecordDot` instead. [Issue 34 659](https://github.com/tweag/ormolu/issues/659). [Issue 35 705](https://github.com/tweag/ormolu/issues/705). 36 * Support for the `GHC2021` language. 37 38## Ormolu 0.3.1.0 39 40* Allow check mode when working with stdin input. [Issue 634]( 41 https://github.com/tweag/ormolu/issues/634). 42 43* Now guards are printed on a new line if at least one guard is multiline or 44 if all guards together occupy more than one line. The body of each guard 45 is also indented one level deeper in that case. [Issue 46 712](https://github.com/tweag/ormolu/issues/712). 47 48* Invalid Haddock comments are no longer silently deleted, but rather converted 49 into regular comments. [Issue 474](https://github.com/tweag/ormolu/issues/474). 50 51## Ormolu 0.3.0.1 52 53* Improvements to `.cabal` file handling: 54 * When looking for a `.cabal` file, directories were previously 55 erroneously also considered. [Issue 781]( 56 https://github.com/tweag/ormolu/issues/781). 57 * We now print a note if Ormolu was told to consider 58 `.cabal` files, but no suitable one could be found. 59 * Handle an empty `hs-source-dirs` correctly. 60 * Also consider modules which are only conditionally listed 61 in the `.cabal` file. 62 63* The special handling of CPP is now only applied if CPP is 64 actually enabled. [Issue 782](https://github.com/tweag/ormolu/issues/782). 65 66* The left hand side of the `:` operator now uses braces if 67 necessary. [Issue 780](https://github.com/tweag/ormolu/issues/780). 68 69## Ormolu 0.3.0.0 70 71* Data declarations with multiline kind signatures are now formatted 72 correctly. [Issue 749](https://github.com/tweag/ormolu/issues/749). 73 74* Infix arrow command formations are formatted like usual operators. 75 This fixes [Issue 748](https://github.com/tweag/ormolu/issues/748). 76 77* `do` arrow commands are formatted more flexibly. Fixes [Issue 78 753](https://github.com/tweag/ormolu/issues/753). 79 80* Source code is always read and written using UTF8 and ignoring the native 81 line ending conventions. [Issue 82 717](https://github.com/tweag/ormolu/issues/717). 83 84* Opt-in support to respect default-extensions and default-language 85 from .cabal files. [Issue 517](https://github.com/tweag/ormolu/issues/517). 86 87* Empty case expressions are now rendered with braces. [Issue 88 765](https://github.com/tweag/ormolu/issues/765). 89 90* Omit braces on repeated application of `do` blocks. [Issue 91 735](https://github.com/tweag/ormolu/issues/735). 92 93* Improved handling of disabled regions. [PR 773]( 94 https://github.com/tweag/ormolu/pull/773). 95 * Disabled regions are now exactly preserved, in particular 96 empty lines and trailing spaces. [Issue 97 673](https://github.com/tweag/ormolu/issues/673). 98 * Strings like `-}` can now be present in disabled regions. 99 [Issue 708](https://github.com/tweag/ormolu/issues/708). 100 101 This means that using CPP or magic comments in certain ways which 102 were only supported as a side effect previously (like in 103 [Issue 601](https://github.com/tweag/ormolu/issues/601)) 104 will now result in formatting failures. Also see [Issue 774]( 105 https://github.com/tweag/ormolu/issues/774). 106 107## Ormolu 0.2.0.0 108 109* Now standalone kind signatures are grouped with type synonyms. [Issue 110 683](https://github.com/tweag/ormolu/issues/683). 111 112* `TemplateHaskell` is not enabled by default anymore. [Issue 113 699](https://github.com/tweag/ormolu/issues/699). 114 115* Made record dot pre-processor rendering idempotent in certain specific 116 cases. [Issue 701](https://github.com/tweag/ormolu/issues/701). 117 118* Added support for arrow command application. [Issue 119 716](https://github.com/tweag/ormolu/issues/716). 120 121* Switched to `ghc-lib-parser-9.0.1`. [PR 122 722](https://github.com/tweag/ormolu/pull/722). 123 * Support for the new language extensions: 124 * `LexicalNegation`, `LinearTypes`: disabled by default 125 * `QualifiedDo`: enabled by default 126 * Due to [upstream changes in whitespace sensitity]( 127 https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.0#whitespace-sensitive-and-), 128 `TypeApplications` is now *enabled* by default. [Issue 129 452](https://github.com/tweag/ormolu/issues/452). 130 * Haddocks on declarations in files without a `module` header are no longer 131 deleted. [Issue 480](https://github.com/tweag/ormolu/issues/480). 132 * Due to a change in Haddock parsing, empty Haddock comments on function 133 arguments now get deleted. 134 135* CTYPE pragmas are now preserved. [Issue 689]( 136 https://github.com/tweag/ormolu/issues/689). 137 138* `TypeApplications` in data/type family instances are now supported. [Issue 139 698](https://github.com/tweag/ormolu/issues/698). 140 141* Formatting infix arrow command formations now preserves the AST. [Issue 142 718](https://github.com/tweag/ormolu/issues/718). 143 144* Surround code in brackets with spaces if it contains a `StarIsType` `*` to 145 prevent unparseable output. [Issue 704](https://github.com/tweag/ormolu/issues/704). 146 147* Formatting applied multiline constructs in do blocks now preserves the AST. 148 [Issue 707](https://github.com/tweag/ormolu/issues/707). 149 150 This will sometimes result in odd indentations, e.g. this snippet is a 151 fixed point: 152 ```haskell 153 foo = do 154 do 155 (+1) 156 1 157 ``` 158 159* GHC options passed in via the CLI can now be overridden in local files. 160 Previously, if an extension was disabled via the CLI, it could not be 161 re-enabled per file. 162 163* `NegativeLiterals` is no longer enabled by default. Also, spaces after 164 negation via `-` are removed where possible. [Issue 165 694](https://github.com/tweag/ormolu/issues/694). 166 167* Minus signs in literal patterns are now preserved in all cases. [Issue 168 733](https://github.com/tweag/ormolu/issues/733). 169 170* Added support for left-to-right arrow application. [Issue 171 737](https://github.com/tweag/ormolu/issues/737). 172 173* Now `--mode check` fails on missing trailing blank lines. [Issue 174 743](https://github.com/tweag/ormolu/issues/743). 175 176* Fixed indentation of arrow forms in do blocks. [Issue 177 739](https://github.com/tweag/ormolu/issues/739). 178 179## Ormolu 0.1.4.1 180 181* Added command line option `--color` to control how diffs are printed. 182 Standardized the way errors are printed. 183 184## Ormolu 0.1.4.0 185 186* Added support for monad comprehensions. [Issue 187 665](https://github.com/tweag/ormolu/issues/665). 188 189* Fixed a bug when a space was inserted in front of promoted types even when 190 it wasn't strictly necessary. [Issue 191 668](https://github.com/tweag/ormolu/issues/668). 192 193* Now the checking mode displays diffs per file when unformatted files are 194 found. The rendering of the diffs is also improved. [Issue 195 656](https://github.com/tweag/ormolu/issues/656). 196 197## Ormolu 0.1.3.1 198 199* Fixed a problem with multiline record updates using the record dot 200 preprocessor. [Issue 658](https://github.com/tweag/ormolu/issues/658). 201 202## Ormolu 0.1.3.0 203 204* Ormolu no longer overwrites already formatted files. [PR 205 649](https://github.com/tweag/ormolu/pull/649). 206 207* Now a space is guaranteed before ticked promoted types. [Issue 208 631](https://github.com/tweag/ormolu/issues/631). 209 210* Made formatting of single-line explicitly bidirectional pattern synonyms 211 idempotent. [Issue 630](https://github.com/tweag/ormolu/issues/630). 212 213## Ormolu 0.1.2.0 214 215* Fixed the bug when comments in different styles got glued together after 216 formatting. [Issue 589](https://github.com/tweag/ormolu/issues/589). 217 218* Added `-i` as a shortcut for `--mode inplace`. [Issue 219 467](https://github.com/tweag/ormolu/issues/467). 220 221* Improved grouping of top-level declarations. [Issue 222 466](https://github.com/tweag/ormolu/issues/466). 223 224## Ormolu 0.1.1.0 225 226* Imports in a import lists are now normalized: duplicate imports are 227 combined/eliminated intelligently. 228 229* Import declarations that can be merged are now automatically merged. 230 [Issue 414](https://github.com/tweag/ormolu/issues/414). 231 232* The magic comments for disabling and enabling Ormolu now can encompass any 233 fragment of code provided that the remaining code after exclusion of the 234 disabled part is still syntactically correct. [Issue 235 601](https://github.com/tweag/ormolu/issues/601). 236 237* Improved sorting of operators in imports. [Issue 238 602](https://github.com/tweag/ormolu/issues/602). 239 240* Fixed a bug related to trailing space in multiline comments in certain 241 cases. [Issue 603](https://github.com/tweag/ormolu/issues/602). 242 243* Added support for formatting linked lists with `(:)` as line terminator. 244 [Issue 478](https://github.com/tweag/ormolu/issues/478). 245 246* Fixed rendering of function arguments in multiline layout. [Issue 247 609](https://github.com/tweag/ormolu/issues/609). 248 249* Blank lines between definitions in `let` and `while` bindings are now 250 preserved. [Issue 554](https://github.com/tweag/ormolu/issues/554). 251 252* Fixed the bug when type applications stuck to the `$` of TH splices that 253 followed them. [Issue 613](https://github.com/tweag/ormolu/issues/613). 254 255* Improved region formatting so that indented fragments—such as definitions 256 inside of `where` clauses—can be formatted. [Issue 257 572](https://github.com/tweag/ormolu/issues/572). 258 259* Fixed the bug related to the de-association of pragma comments. [Issue 260 619](https://github.com/tweag/ormolu/issues/619). 261 262## Ormolu 0.1.0.0 263 264* Fixed rendering of type signatures concerning several identifiers. [Issue 265 566](https://github.com/tweag/ormolu/issues/566). 266 267* Fixed an idempotence issue with inline comments in tuples and parentheses. 268 [Issue 450](https://github.com/tweag/ormolu/issues/450). 269 270* Fixed an idempotence issue when certain comments were picked up as 271 “continuation” of a series of comments [Issue 272 449](https://github.com/tweag/ormolu/issues/449). 273 274* Fixed an idempotence issue related to different indentation levels in a 275 comment series. [Issue 512](https://github.com/tweag/ormolu/issues/512). 276 277* Fixed an idempotence issue related to comments which may happen to be 278 separated from the elements they are attached to by the equality sign. 279 [Issue 340](https://github.com/tweag/ormolu/issues/340). 280 281* Fixed an idempotence issue with type synonym and data declarations where 282 the type has a Haddock. [Issue 283 578](https://github.com/tweag/ormolu/issues/578). 284 285* Fix the false positive about AST differences in presence of comments with 286 multiple blank lines in a row. [Issue 287 518](https://github.com/tweag/ormolu/issues/518). 288 289* Fixed rendering of comments around if expressions. [Issue 290 458](https://github.com/tweag/ormolu/issues/458). 291 292* Unnamed fields of data constructors are now documented using the `-- ^` 293 syntax. [Issue 445](https://github.com/tweag/ormolu/issues/445) and [Issue 294 428](https://github.com/tweag/ormolu/issues/428). 295 296* Fixed non-idempotent transformation of partly documented data definition. 297 [Issue 590](https://github.com/tweag/ormolu/issues/590). 298 299* Fixed an idempotence issue related to operators. [Issue 300 522](https://github.com/tweag/ormolu/issues/522). 301 302* Renamed the `--check-idempotency` flag to `--check-idempotence`. 303 Apparently only the latter is correct. 304 305## Ormolu 0.0.5.0 306 307* Grouping of statements in `do`-blocks is now preserved. [Issue 308 74](https://github.com/tweag/ormolu/issues/74). 309 310* Grouping of TH splices is now preserved. [Issue 311 507](https://github.com/tweag/ormolu/issues/507). 312 313* Comments on pragmas are now preserved. [Issue 314 216](https://github.com/tweag/ormolu/issues/216). 315 316* Ormolu can now be enabled and disabled via special comments. [Issue 317 435](https://github.com/tweag/ormolu/issues/435). 318 319* Added experimental support for simple CPP. [Issue 320 415](https://github.com/tweag/ormolu/issues/415). 321 322* Added two new options `--start-line` and `--end-line` that allow us to 323 select a region to format. [Issue 324 516](https://github.com/tweag/ormolu/issues/516). 325 326* Fixed rendering of module headers in the presence of preceding comments or 327 Haddocks. [Issue 561](https://github.com/tweag/ormolu/issues/561). 328 329## Ormolu 0.0.4.0 330 331* When given several files to format, Ormolu does not stop on the first 332 failure, but tries to format all the files. [Issue 333 502](https://github.com/tweag/ormolu/issues/502). 334 335* Made rendering of pattern matches involving operators consistent with 336 other cases of rendering of operators. [Issue 337 500](https://github.com/tweag/ormolu/issues/500). 338 339* More compact rendering of type family injectivity constraints. [Issue 340 482](https://github.com/tweag/ormolu/issues/482). 341 342* Improved rendering of the keyword `where` in class, data, and type family 343 declarations. When headers of these declarations are multi-line `where` is 344 now put on its own line. [Issue 345 509](https://github.com/tweag/ormolu/issues/509). 346 347* Fixed the bug pertaining to rendering of arrow notation with multiline 348 expressions. [Issue 513](https://github.com/tweag/ormolu/issues/513). 349 350* Made rendering of data type definitions, value-level applications, and 351 application of types use the same style. Moreover, existential now doesn't 352 cause the data constructor be unconditionally rendered in multiline 353 layout. [Issue 427](https://github.com/tweag/ormolu/issues/427). 354 355* Records with a single data constructor are now formatted more compactly. 356 [Issue 425](https://github.com/tweag/ormolu/issues/425). 357 358* Switched to `ghc-lib-parser-8.10.1`. 359 360* Implemented support for the new language extensions `ImportQualifiedPost` 361 and `StandaloneKindSignatures`. 362 363## Ormolu 0.0.3.1 364 365* Fixed rendering of record updates with the record dot preprocessor syntax 366 [Issue 498](https://github.com/tweag/ormolu/issues/498). 367 368## Ormolu 0.0.3.0 369 370* Fixed an issue related to unnecessary use of curly braces. [Issue 371 473](https://github.com/tweag/ormolu/issues/473). 372 373* Fixed the issue with formatting multi-way if when it happens to be a 374 function applied to arguments [Issue 375 488](https://github.com/tweag/ormolu/issues/488). This changed the way 376 multi-line if is formatted in general. 377 378* Added support for record dot pre-processor when used via the plugin. 379 [Issue 486](https://github.com/tweag/ormolu/issues/486). 380 381* Stopped hanging record constructors and improved placing 382 potentially-hanging consturctions in the presence of comments. [Issue 383 447](https://github.com/tweag/ormolu/issues/447). 384 385* Fixed indentation in presence of type applications. [Issue 386 493](https://github.com/tweag/ormolu/issues/493). 387 388* Class and instance declarations now do not have a blank line after 389 `where`. Grouping of methods from the original input is also preserved 390 with some normalizations. [Issue 391 431](https://github.com/tweag/ormolu/issues/431). 392 393## Ormolu 0.0.2.0 394 395* Switched to `ghc-lib-parser` instead of depending on the `ghc` package 396 directly. This should allow us to use newest features of GHC while not 397 necessarily depending on the newest version of the compiler. In addition 398 to that Ormolu is now GHCJS-compatible. 399 400* Now unrecognized GHC options passed with `--ghc-opt` cause Ormolu to fail 401 (exit code 7). 402 403* Fixed formatting of result type in closed type families. See [issue 404 420](https://github.com/tweag/ormolu/issues/420). 405 406* Fixed a minor inconsistency between formatting of normal and foreign type 407 signatures. See [issue 408](https://github.com/tweag/ormolu/issues/408). 408 409* Fixed a bug when comment before module header with Haddock was moved 410 inside the export list. See [issue 411 430](https://github.com/tweag/ormolu/issues/430). 412 413* Empty `forall`s are now correctly preserved. See [issue 414 429](https://github.com/tweag/ormolu/issues/429). 415 416* Fixed [issue 446](https://github.com/tweag/ormolu/issues/446), which 417 involved braces and operators. 418 419* When there are comments between preceding Haddock (pipe-style) and its 420 corresponding declaration they are preserved like this in the output 421 instead of being shifted. To be clear, this is not a very good idea to 422 have comments in that position because the Haddock will end up not being 423 associated with the declarations. Issues 424 [440](https://github.com/tweag/ormolu/issues/440) and 425 [448](https://github.com/tweag/ormolu/issues/448). 426 427* Implemented correct handling of shebangs. [Issue 428 377](https://github.com/tweag/ormolu/issues/377). 429 430* Implemented correct handling of stack headers. [Issue 431 393](https://github.com/tweag/ormolu/issues/393). 432 433* Sorting language pragmas cannot not change meaning of the input program 434 anymore. [Issue 404](https://github.com/tweag/ormolu/issues/404). 435 436* Fixed formatting of applications where function is a complex expression. 437 [Issue 444](https://github.com/tweag/ormolu/issues/444). 438 439## Ormolu 0.0.1.0 440 441* Initial release. 442