
#3384: Add HsSyn prettyprinter tests -------------------------------------+------------------------------------- Reporter: igloo | Owner: Type: task | Status: new Priority: normal | Milestone: ⊥ Component: Test Suite | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by alanz): Updating https://github.com/alanz/ghc-exactprint/blob/no- annotations/tests/Test/NoAnnotations.hs#L119 to be {{{#!hs let !printed = pragmaStr ++ "\n" ++ (showSDoc_ $ GHC.ppr parsedOrig) }}} i.e. to simply `ppr` the `ParsedSource` and compare the resulting re- parsed AST. The initial results are for ghc-8.0.1, of the 823 test cases in ghc- exactprint, the straight GHC ppr fails to roundtrip 106 where it cannot be reparsed, and another 84 where the re-parsed AST does not match the original. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/3384#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler