1
1
mirror of https://github.com/google/ormolu.git synced 2024-12-11 08:44:45 +03:00
Commit Graph

29 Commits

Author SHA1 Message Date
mrkkrp
c201862f11 Drop ‘yaml’ configuration 2019-07-07 13:53:59 +02:00
waddlaw
ae40a33507 Sort language pragmas and fix their placement in modules
The approach we take here is parsing of language pragmas on creation of
comment stream and then pretty-printing them in a separate block.
2019-07-05 20:03:31 +02:00
Rupert Horlick
3c506ecf2b Implement printer for ‘WarningD’ 2019-06-26 22:26:31 +02:00
Basile Henry
2fd53f6af2 Support typed and untyped splices 2019-06-23 17:59:47 +02:00
Rupert Horlick
c460bfa346 [#53] Implement rendering for foreign declarations
Closes #53
2019-06-19 21:20:19 +02:00
Basile Henry
73cc30c5d1 Add AnnD printer 2019-06-19 20:50:24 +02:00
Basile Henry
1753c7d647 Add Default declaration printer
Co-authored-by: Rupert Horlick <ruhatch@me.com>
2019-06-19 17:53:42 +02:00
PanAeon
a325cd6cdf Support rendering of role annotation declarations 2019-06-16 14:49:56 +02:00
yumiova
7e31ae7407 Implement rendering of type class declarations 2019-06-16 13:59:10 +02:00
yumiova
5f5f9227aa Implement rendering of instance declarations
This pull request implements half of #49. Specifically, it deals with pretty printing instance declarations and most structures needed to support that. This includes pretty printing of associated types (and therefore also type family instances.) However, this _does not_ include pretty printing of associated data types.

Pretty printing of type class declarations is to be dealt with at a later time.

Instances are formatted such that indentation hangs after the `instance`. Namely,

```haskell
instance Eq a
         => Eq [a] where
```

To support pretty printing associated types, the function `p_tyFamInstEqn` was exported from the appropriate module. This was done to avoid redundant code duplication.
2019-06-08 22:28:25 +02:00
waddlaw
59bc871d1a Implement view patterns 2019-06-08 20:31:08 +02:00
mrkkrp
9a0276b36d Implement the rest of binding types
This includes pattern binds, pattern synonyms, and a refactoring around
printing ‘RdrName’s.
2019-06-04 00:49:33 +02:00
mrkkrp
34b9b71601 Build the project with Nix and switct to GHC 8.6.4
It was decided that we're going to make the project compatible with just one
GHC version at a time. Right now this version is going to be 8.6.4.

A small refactoring included, plus support for the “deriving via” feature.
2019-05-31 14:43:15 +02:00
mrkkrp
09afebbd9c Implement rendering of simplest value-level constructs 2019-05-18 18:47:53 +02:00
mrkkrp
3553fc35d0 Implement signature declarations
This implements not everything, but the most common case: simple top-level
declarations for functions.
2019-05-16 19:03:14 +02:00
mrkkrp
759c2c6854 Fix ‘data-files’ field in the Cabal file
Apparently the situation here is quite broken because we need to list all
sub-directories explicitly, here is a Cabal issue:

https://github.com/haskell/cabal/issues/6043
2019-05-10 19:00:43 +02:00
mrkkrp
b9c8b64947 Implement more precise comment placement without ‘ghc-exactprint’
‘ghc-exactprint’ (or perhaps lexer of GHC itself) does a fairly poor job at
associating comments with elements of AST. In many cases the result is not
what you'd expect. We ran into insuperable problems with that to the effect
that correct comment placement were impossible.

The new approach is to exploit the raw position information provided by the
GHC lexer, that is, spans attached to AST elements and comments. This
allowed us to place comments in output in a very precise and satisfactory
fashion.
2019-05-08 22:03:21 +02:00
mrkkrp
00b08eeaff Implement rendering of data type declarations 2019-05-08 22:03:21 +02:00
mrkkrp
e01287aa24 Implement rendering of type synonyms 2019-04-09 22:45:23 +02:00
mrkkrp
576f943e7f Implement rendering of types and type families declarations 2019-04-07 19:33:28 +02:00
mrkkrp
b6d49bb625 Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
mrkkrp
2f73bae977 Implement CLI for the application 2019-02-28 22:22:10 +01:00
mrkkrp
b2e05d6f65 Throw exception when CPP is enabled (plus some refactoring) 2019-02-28 22:22:10 +01:00
mrkkrp
bf22720b61 Implement diffing of comment annotations 2019-02-21 23:30:29 +01:00
mrkkrp
41a54caca1 Implement diffing of ASTs 2019-02-21 23:30:29 +01:00
mrkkrp
120b4caefc Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
mrkkrp
fcd35a1faa Implement pretty printing combinators 2019-01-28 19:26:13 +01:00
mrkkrp
02c6a58f27
Implement basic parser for fooling around 2018-12-08 17:34:26 +07:00
mrkkrp
dc6605107a
Initial commit 2018-11-25 20:51:22 +07:00