1
1
mirror of https://github.com/google/ormolu.git synced 2024-11-23 14:16:24 +03:00
ormolu/data/examples/import
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
..
comments-inside-imports-out.hs Change the style of type signatures 2019-10-02 16:52:42 +02:00
comments-inside-imports.hs Handle comments inside of import statements better 2019-09-12 21:59:43 +02:00
comments-per-import-out.hs Implement more precise comment placement without ‘ghc-exactprint’ 2019-05-08 22:03:21 +02:00
comments-per-import.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
explicit-imports-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
explicit-imports-with-comments-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
explicit-imports-with-comments.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
explicit-imports.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
explicit-prelude-out.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
explicit-prelude.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
misc-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
misc.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
nested-explicit-imports-out.hs Align opening/closing parentheses and other similar punctuation 2019-09-17 11:58:22 +02:00
nested-explicit-imports.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
qualified-prelude-out.hs Fix comparison of prelude imports 2019-06-30 22:42:32 +02:00
qualified-prelude.hs Fix comparison of prelude imports 2019-06-30 22:42:32 +02:00
simple-out.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
simple.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
sorted-out.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00
sorted.hs Implement pretty-printing of imports 2019-03-21 14:45:06 +01:00