ormolu/data/examples/module-header
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
..
double-dot-with-names-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
double-dot-with-names.hs Fix mixing names with double dot in export lists 2019-07-29 23:14:31 +02:00
double-shebangs-out.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
double-shebangs.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
empty-out.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
empty.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
leading-empty-line-out.hs Change the style of type signatures 2019-10-02 16:52:42 +02:00
leading-empty-line.hs Change the style of type signatures 2019-10-02 16:52:42 +02:00
multiline2-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
multiline2.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
multiline-empty-out.hs Remove trailing whitespace from empty export list 2019-06-23 18:38:46 +02:00
multiline-empty.hs Remove trailing whitespace from empty export list 2019-06-23 18:38:46 +02:00
multiline-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
multiline-with-comments-out.hs Change the style of type signatures 2019-10-02 16:52:42 +02:00
multiline-with-comments.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
multiline.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
named-section-out.hs Change the style of type signatures 2019-10-02 16:52:42 +02:00
named-section.hs Change the style of type signatures 2019-10-02 16:52:42 +02:00
shebang-out.hs Fix positioning of shebangs 2019-09-14 16:47:19 +02:00
shebang.hs Fix positioning of shebangs 2019-09-14 16:47:19 +02:00
simple-out.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
simple-with-comments-out.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
simple-with-comments.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
simple.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
singleline-empty-out.hs Sort language pragmas and fix their placement in modules 2019-07-05 20:03:31 +02:00
singleline-empty.hs Sort language pragmas and fix their placement in modules 2019-07-05 20:03:31 +02:00
singleline-out.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
singleline.hs Implement handling of comments and printing of module headers 2019-02-21 18:15:27 +01:00
warning-pragma-list-multiline-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
warning-pragma-list-multiline.hs [#52] Implement WARNING/DEPRECATED in module header 2019-06-19 17:35:45 +02:00
warning-pragma-multiline-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
warning-pragma-multiline.hs [#52] Implement WARNING/DEPRECATED in module header 2019-06-19 17:35:45 +02:00
warning-pragma-out.hs Tweak formatting of warning pragmas 2019-08-09 11:00:06 +02:00
warning-pragma-singleton-list-out.hs [#52] Implement WARNING/DEPRECATED in module header 2019-06-19 17:35:45 +02:00
warning-pragma-singleton-list.hs [#52] Implement WARNING/DEPRECATED in module header 2019-06-19 17:35:45 +02:00
warning-pragma.hs [#52] Implement WARNING/DEPRECATED in module header 2019-06-19 17:35:45 +02:00