Alexander Esgen
35647fbe62
Format \cases
with multi-line multiple patterns correctly
2023-05-17 21:11:30 +02:00
Mark Karpov
8f2bc36705
Allow to specify module re-exports in .ormolu files
...
It turns out that gaining knowledge of all module re-exports in the
ecosystem is tricky because the Hoogle database does not contain this
information, so one would need to download all 14+k packages from Hackage
and parse their source code. We've decided that perhaps hardcoding some
common re-exports and otherwise giving the users a way to make Ormolu aware
of arbitrary important re-exports is a satisfactory solution for now.
Co-authored-by: amesgen <alexander.esgen@tweag.io>
2023-05-15 20:43:41 +02:00
Mike Pilgrem
b89c0890e0
Relax upper bound to accommodate dependency on ansi-terminal-1.0
2023-05-15 18:07:27 +02:00
Mark Karpov
d9e3397bea
Update the ghc-wasm-meta Nix input to fix the build
2023-05-10 13:50:47 +02:00
Brandon Chinn
6545081089
Remove redundant special case of empty list in p_hsmodExports
2023-04-25 10:03:37 +02:00
Brandon Chinn
f01183daee
Break out separate getEnclosingSpanWhere helper
2023-04-25 10:03:37 +02:00
Brandon Chinn
4817ef220f
Return Maybe Comment from withPoppedComment
2023-04-25 10:03:37 +02:00
Brandon Chinn
3675cdf282
Add LComment
2023-04-25 10:03:37 +02:00
Brandon Chinn
874bd17573
Simplify popComment
2023-04-25 10:03:37 +02:00
Alexander Esgen
a1a50efc6b
Make all packages available for fixity inference in Ormolu Live
2023-04-24 20:26:39 +02:00
Mark Karpov
badafc0452
Implement a more precise inference of fixity information
2023-04-24 14:39:33 +02:00
Alexander Esgen
db1ebbba2f
Don't let comments escape from empty export lists
2023-04-24 13:54:41 +02:00
Alexander Esgen
683e2a2043
Support DatatypeContexts
2023-04-24 10:32:41 +02:00
Alexander Esgen
2ee0dab98d
Improve consistency when formatting certain applicands
2023-04-12 17:21:02 +02:00
dependabot[bot]
ee75df1273
Bump cachix/install-nix-action from 19 to 20
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from 19 to 20.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/v19...v20 )
---
updated-dependencies:
- dependency-name: cachix/install-nix-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-04-12 08:56:22 +02:00
Mark Karpov
82563b43f6
Version bump (0.6.0.1)
2023-04-04 18:24:44 +02:00
Alexander Esgen
edc68d1099
Fix false positives in AST diffing related to UnicodeSyntax
2023-04-04 16:57:20 +02:00
Mark Karpov
319541950e
Version bump (0.6.0.0)
2023-04-03 15:51:26 +02:00
Alexander Esgen
8b9a28cf47
Modernize GHC warnings
2023-03-31 21:13:35 +02:00
Alexander Esgen
c8f4afde2b
Switch to GHC2021, remove redundant pragmas
2023-03-31 21:13:35 +02:00
Julio César
310f90062c
Provide more context on Cabal file parsing errors
...
When ormolu fails to parse the Cabal file the user doesn't know what is the
actual error as only the cabal filepath is reported. This makes the necessary
changes to actually show what errors the cabal file parser encountered.
Before:
Parsing this .cabal file failed:
/path/to/file.cabal
After:
Parsing this .cabal file failed:
/path/to/file.cabal:0:0: Unsupported cabal-version 3.8. See https://github.com/haskell/cabal/issues/4899 .
Note: Removing the `Eq` instance on `OrmoluException` was the easy way to not
having to implement an orphan `Eq` instance on `PError`. This does not have
any impact elsewhere as we're actually not making use of the `Eq` instance
on this exception type.
2023-03-31 21:11:12 +02:00
Alexander Esgen
9a8481320b
ghc-lib-parser 9.6
2023-03-31 20:25:54 +02:00
Alexander Esgen
5a39889ada
Don't always add space before SourceText
...
We later will use `p_sourceText` for OverloadedLabels, which are preceded by a
`#` and not by a space.
2023-03-31 20:25:54 +02:00
Alexander Esgen
f9e2c5efe9
Simplify AST diffing
...
In particular, make the common case of considering all inhabitants equal easier.
2023-03-31 20:25:54 +02:00
Alexander Esgen
8aee5c0df3
Insert space before char literals in ticked promoted constructs
2023-03-21 19:29:26 +01:00
Mark Karpov
13f11d0eb3
Format haddocks attached to arguments of data constructors with pipe
2023-02-25 18:44:43 +01:00
Alexander Esgen
f6dcd728b3
Pre-init Ormolu Live with Wizer
...
Co-authored-by: Cheng Shao <terrorjack@type.dance>
2023-02-17 11:25:44 +01:00
dependabot[bot]
24cb86a398
Bump cachix/install-nix-action from 18 to 19
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from 18 to 19.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19 )
---
updated-dependencies:
- dependency-name: cachix/install-nix-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 09:18:13 +01:00
Mark Karpov
74762a9814
Add Ormolu.Terminal.QualifiedDo to the list of modules
2023-02-03 12:48:34 +01:00
Brandon Chinn
4e8fc16479
Implement Term as an AST builder + interpreters
2023-02-01 20:39:33 +01:00
Alexander Esgen
1b703670b5
Add Stack CI to keep stack.yaml
up-to-date
2023-02-01 08:53:26 +01:00
Brandon Chinn
49ff8fb49d
Fix stack build
2023-01-31 10:08:13 +01:00
Brandon Chinn
30531f008c
Replace DList with Seq
2023-01-31 10:04:29 +01:00
Alexander Esgen
22c7a0b54e
Update flake inputs, add GHC 9.4.4 to CI, minor tweaks
2023-01-27 12:09:06 +01:00
Mark Karpov
1b39d94d0c
Version bump (0.5.3.0)
2023-01-26 14:30:23 +01:00
Mark Karpov
c81320d8a1
Expose a more complete API from the Ormolu module
...
Co-authored-by: amesgen <alexander.esgen@tweag.io>
2023-01-25 20:27:25 +01:00
Mark Karpov
5a43ffc288
Gitignore .direnv/
...
This seems to be created when direnv uses a nix flake?
2023-01-24 20:32:38 +01:00
Alexander Esgen
4d62a7e062
Add WASM-based Ormolu Live
...
Co-authored-by: Mark Karpov <mark.karpov@tweag.io>
2023-01-24 18:45:36 +01:00
Alexander Esgen
81ae46ea9d
Allow to disable bundling fixities
...
Should be reverted once the WASM backend supports TH.
Co-authored-by: Mark Karpov <mark.karpov@tweag.io>
2023-01-24 18:45:36 +01:00
Alexander Esgen
0bd2a7962c
Support mtl-2.3
...
Various re-exports got removed.
2023-01-24 18:45:36 +01:00
Alexander Esgen
f0b8690ae1
Use Text
as formatting input
2023-01-23 18:30:21 +01:00
Alexander Esgen
45eaf2a838
Don't use String
for operator and package names
2023-01-23 18:30:21 +01:00
Alexander Esgen
af02809ebe
Add GH Actions CI
2023-01-23 18:10:02 +01:00
Alexander Esgen
4b0bcc2945
Flakeify
...
also drop Ormolu Live temporarily
2023-01-23 18:10:02 +01:00
Mark Karpov
a4a9f4500b
Normalize parentheses in constraints
2023-01-20 18:49:14 +01:00
Mark Karpov
9e4f22e14c
Accept CRLF line endings in .ormolu files
2023-01-17 21:14:23 +01:00
Alexander Esgen
708de707ad
Stop making empty let
s move comments
2023-01-06 17:34:05 +01:00
Alexander Esgen
d8ef4d5d19
Remove last reference to JSON as the fixity DB format
2023-01-05 18:37:03 +01:00
Mark Karpov
810eb7839c
Version bump (0.5.2.0)
2023-01-05 16:15:37 +01:00
Alexander Esgen
a6dd9c16f5
Switch to binary
for parsing the fixity DB
2023-01-05 16:11:05 +01:00