Commit Graph

5 Commits

Author SHA1 Message Date
mrkkrp
8466d6e743 Change the style of type signatures
The commit changes how type signatures are printed. The new style looks like
this:

  foo ::
    Int ->
    Char ->
    String

This works better with foralls and other features of the type system that
will be added in the near future, like linear arrows.

In order to print Haddocks nicely (this seems to be the only acceptable
placement):

  foo ::
    -- | First argument
    Int ->
    -- | Second argument
    Char ->
    -- | Result
    String

It is often necessary to re-arrange them completely and use the “pipe style”
instead of “caret style”. It proved to be a very hard task with our older
comment-handling system, if not impossible.

Here we start parsing Haddocks so that they are treated as components of AST
and we now render them as part of rendering of those components. The
existing framework for handling comments only prints non-Haddock comments
now.

The change caused a fair number of new problems and failures which I added
new tests for.
2019-10-02 16:52:42 +02:00
Utku Demir
d900f4efaf Test a few Hackage packages on CI 2019-08-30 12:44:14 +02:00
mrkkrp
c6a6193525
Do not run tests when trying Ormolu on Hackage packages 2019-08-05 15:15:45 +02:00
mrkkrp
78e8dd830a Make sure we always get both original and formatted files 2019-07-14 13:14:55 +02:00
mrkkrp
7a9aab77b3 Add nix expression for reformatting sources of arbitrary packages
See the description in readme.
2019-07-14 13:14:55 +02:00