diff --git a/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs b/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs index 01415ce5..0d463824 100644 --- a/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs +++ b/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs @@ -1784,8 +1784,8 @@ instance ExactPrint InWarningCategory where exact (InWarningCategory tkIn source (L l wc)) = do tkIn' <- markEpToken tkIn - L _ (_,wc') <- markAnnotated (L l (source, wc)) - return (InWarningCategory tkIn' source (L l wc')) + L l' (_,wc') <- markAnnotated (L l (source, wc)) + return (InWarningCategory tkIn' source (L l' wc')) instance ExactPrint (SourceText, WarningCategory) where getAnnotationEntry _ = NoEntryVal @@ -2871,9 +2871,9 @@ instance ExactPrint (Sig GhcPs) where an1 <- markEpAnnLMS'' an0 lidl AnnClose (Just "#-}") return (SCCFunSig (an1,src) ln' ml') - exact (CompleteMatchSig (an,src) cs mty) = do + exact (CompleteMatchSig (an,src) (L l cs) mty) = do an0 <- markAnnOpen an src "{-# COMPLETE" - cs' <- markAnnotated cs + cs' <- mapM markAnnotated cs (an1, mty') <- case mty of Nothing -> return (an0, mty) @@ -2882,7 +2882,7 @@ instance ExactPrint (Sig GhcPs) where ty' <- markAnnotated ty return (an1, Just ty') an2 <- markEpAnnLMS'' an1 lidl AnnClose (Just "#-}") - return (CompleteMatchSig (an2,src) cs' mty') + return (CompleteMatchSig (an2,src) (L l cs') mty') -- --------------------------------------------------------------------- diff --git a/tests/Test.hs b/tests/Test.hs index 25739637..57d82c49 100644 --- a/tests/Test.hs +++ b/tests/Test.hs @@ -145,13 +145,13 @@ mkTests = do return $ TestList [ internalTests, roundTripTests - -- , - -- (transformTests libdir) - -- , (failingTests libdir) - -- , - -- roundTripBalanceCommentsTests - -- , - -- roundTripMakeDeltaTests + , + (transformTests libdir) + , (failingTests libdir) + , + roundTripBalanceCommentsTests + , + roundTripMakeDeltaTests ] -- Tests that are no longer needed @@ -213,10 +213,12 @@ tt' = do -- mkParserTest libdir "ghc80" "ForFree.hs" -- mkParserTestMD libdir "ghc80" "ForFree.hs" - -- Current failures (roundtrip only) - -- mkParserTest libdir "ghc710" "Stmts.hs" - -- mkParserTest libdir "ghc80" "ForFree.hs" - mkParserTest libdir "ghc96" "ContinuationIO.hs" + -- Current failures (makeDeltaAst only) + -- mkParserTest libdir "ghc82" "Completesig03A.hs" + mkParserTestMD libdir "ghc82" "Completesig03A.hs" + + -- ExportWarnings_aux.hs + -- ghc98:7:T23465.hs -- Needs GHC changes