mirror of
https://github.com/google/ormolu.git
synced 2024-11-23 14:16:24 +03:00
8466d6e743
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. |
||
---|---|---|
.. | ||
comments-inside-imports-out.hs | ||
comments-inside-imports.hs | ||
comments-per-import-out.hs | ||
comments-per-import.hs | ||
explicit-imports-out.hs | ||
explicit-imports-with-comments-out.hs | ||
explicit-imports-with-comments.hs | ||
explicit-imports.hs | ||
explicit-prelude-out.hs | ||
explicit-prelude.hs | ||
misc-out.hs | ||
misc.hs | ||
nested-explicit-imports-out.hs | ||
nested-explicit-imports.hs | ||
qualified-prelude-out.hs | ||
qualified-prelude.hs | ||
simple-out.hs | ||
simple.hs | ||
sorted-out.hs | ||
sorted.hs |