diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2022-04-10 16:37:16 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-23 21:04:49 -0400 |
commit | e9fff12b34bb9770491d24eff5c280f44dc8cfc1 (patch) | |
tree | 13007782780918e0b69f27d1157a3d4d487997d1 /utils/check-exact | |
parent | 1a4195b04866ebdb5f42006fb92b8a73a4aa2bac (diff) | |
download | haskell-e9fff12b34bb9770491d24eff5c280f44dc8cfc1.tar.gz |
EPA : Remove duplicate comments in DataFamInstD
The code
data instance Method PGMigration = MigrationQuery Query
-- ^ Run a query against the database
| MigrationCode (Connection -> IO (Either String ()))
-- ^ Run any arbitrary IO code
Resulted in two instances of the "-- ^ Run a query against the database"
comment appearing in the Exact Print Annotations when it was parsed.
Ensure only one is kept.
Closes #20239
Diffstat (limited to 'utils/check-exact')
-rw-r--r-- | utils/check-exact/ExactPrint.hs | 12 | ||||
-rw-r--r-- | utils/check-exact/Main.hs | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/utils/check-exact/ExactPrint.hs b/utils/check-exact/ExactPrint.hs index 2451354684..bda1647ccd 100644 --- a/utils/check-exact/ExactPrint.hs +++ b/utils/check-exact/ExactPrint.hs @@ -850,16 +850,14 @@ instance ExactPrint (HsDecl GhcPs) where -- --------------------------------------------------------------------- instance ExactPrint (InstDecl GhcPs) where - getAnnotationEntry (ClsInstD _ _) = NoEntryVal - getAnnotationEntry (DataFamInstD an _) = fromAnn an - getAnnotationEntry (TyFamInstD _ _) = NoEntryVal - + getAnnotationEntry (ClsInstD _ _) = NoEntryVal + getAnnotationEntry (DataFamInstD _ _) = NoEntryVal + getAnnotationEntry (TyFamInstD _ _) = NoEntryVal exact (ClsInstD _ cid) = markAnnotated cid - exact (DataFamInstD an decl) = do - exactDataFamInstDecl an TopLevel decl + exact (DataFamInstD _ decl) = do + exactDataFamInstDecl noAnn TopLevel decl exact (TyFamInstD _ eqn) = do - -- exactTyFamInstDecl an TopLevel eqn markAnnotated eqn -- --------------------------------------------------------------------- diff --git a/utils/check-exact/Main.hs b/utils/check-exact/Main.hs index b83cc9cd86..46e68d638a 100644 --- a/utils/check-exact/Main.hs +++ b/utils/check-exact/Main.hs @@ -198,7 +198,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/printer/PprSemis.hs" Nothing -- "../../testsuite/tests/printer/PprEmptyMostly.hs" Nothing -- "../../testsuite/tests/parser/should_compile/DumpSemis.hs" Nothing - "../../testsuite/tests/printer/Test20256.hs" Nothing + "../../testsuite/tests/ghc-api/exactprint/Test20239.hs" Nothing -- cloneT does not need a test, function can be retired |