summaryrefslogtreecommitdiff
path: root/testsuite/tests/printer
Commit message (Collapse)AuthorAgeFilesLines
* Pretty-printing of derived multi-parameter classes omits parenthesesAlan Zimmerman2017-10-118-0/+177
| | | | | | | | | | | | | | | | | | | Summary: Pretty printing a splice with an HsAppType in the deriving clause, such as $([d| data Foo a = Foo a deriving (C a) |]) would omit the parens. Test Plan: ./validate Reviewers: RyanGlScott, austin, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14289 Differential Revision: https://phabricator.haskell.org/D4056
* Pretty-printer missing parens for infix class declarationAlan Zimmerman2017-10-023-0/+15
| | | | | | | | | | class (a `C` b) c Is pretty printed as class a `C` b c Fixes #14306
* Pretty-printer no longer butchers function arrow fixityAlan Zimmerman2017-07-104-0/+53
| | | | | | | | | | | | | | It now correctly prints the parens around '(Int -> Int)' in {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -ddump-splices #-} module Bug where $([d| f :: Either Int (Int -> Int) f = undefined |]) Closes #13942
* Parenthesize type/data families correctly for -ddump-splicesAlan Zimmerman2017-04-094-0/+96
| | | | | | | Fix a regression in the pretty-printed code for -ddump-splices, which regressed since 8.0. Closes trac issue #13550
* Explicitly capture whether a splice has a dollar prefixAlan Zimmerman2017-02-271-0/+2
| | | | | | | | | | | | | A top-level splice can be written $splice or splice For accurate pretty-printing, and for ghc-exactprint, capture in the hsSyn AST which variant was parsed.
* Correctly pretty print a wild card in infix positionAlan Zimmerman2017-02-253-0/+11
|
* TH-spliced class instances are pretty-printed incorrectly post-#3384Alan Zimmerman2017-02-104-0/+91
| | | | | | | | | | | | | | | | Summary: The HsSyn prettyprinter tests patch 499e43824bda967546ebf95ee33ec1f84a114a7c broke the pretty-printing of Template Haskell-spliced class instances. Test Plan: ./validate Reviewers: RyanGlScott, austin, goldfire, bgamari Reviewed By: RyanGlScott, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3043
* Typos and grammar in manual/commentsGabor Greif2017-01-231-1/+1
|
* Fix pretty printing of MINIMAL signaturesMatthew Pickering2016-12-151-0/+4
| | | | | | | | | | Reviewers: austin, alanz, bgamari Reviewed By: alanz, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2836
* Fix pretty printing of top level SCC pragmasMatthew Pickering2016-12-133-0/+14
| | | | | | | | | | Reviewers: austin, alanz, bgamari Reviewed By: alanz, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2834
* Ignore stderr of all printer testsAlan Zimmerman2016-12-0830-803/+46
|
* Remove stray commented out line in all.TAlan Zimmerman2016-12-071-1/+0
|
* Fix pretty printer test to nog generate stdoutAlan Zimmerman2016-12-074-189/+3
| | | | It was doing a dump to stdout, which is not repeatable across platforms.
* Add HsSyn prettyprinter testsAlan Zimmerman2016-12-0780-0/+3602
Summary: Add prettyprinter tests, which take a file, parse it, pretty print it, re-parse the pretty printed version and then compare the original and new ASTs (ignoring locations) Updates haddock submodule to match the AST changes. There are three issues outstanding 1. Extra parens around a context are not reproduced. This will require an AST change and will be done in a separate patch. 2. Currently if an `HsTickPragma` is found, this is not pretty-printed, to prevent noise in the output. I am not sure what the desired behaviour in this case is, so have left it as before. Test Ppr047 is marked as expected fail for this. 3. Apart from in a context, the ParsedSource AST keeps all the parens from the original source. Something is happening in the renamer to remove the parens around visible type application, causing T12530 to fail, as the dumped splice decl is after the renamer. This needs to be fixed by keeping the parens, but I do not know where they are being removed. I have amended the test to pass, by removing the parens in the expected output. Test Plan: ./validate Reviewers: goldfire, mpickering, simonpj, bgamari, austin Reviewed By: simonpj, bgamari Subscribers: simonpj, goldfire, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2752 GHC Trac Issues: #3384