summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2023-01-07 16:25:13 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-09 02:36:20 -0500
commit965a273510adfac4f041a31182c2fec82e614e47 (patch)
tree2ce9b1e9b2671a058f22fc6b070908d75035e812 /utils
parent365b30453f0f7361edd40d32ebaa4bea784f3a2b (diff)
downloadhaskell-965a273510adfac4f041a31182c2fec82e614e47.tar.gz
EPA: exact print HsDocTy
To match ghc-exactprint https://github.com/alanz/ghc-exactprint/pull/121
Diffstat (limited to 'utils')
-rw-r--r--utils/check-exact/ExactPrint.hs4
-rw-r--r--utils/check-exact/Main.hs3
2 files changed, 6 insertions, 1 deletions
diff --git a/utils/check-exact/ExactPrint.hs b/utils/check-exact/ExactPrint.hs
index 30a3234ee0..df7fdfda1e 100644
--- a/utils/check-exact/ExactPrint.hs
+++ b/utils/check-exact/ExactPrint.hs
@@ -3898,6 +3898,10 @@ instance ExactPrint (HsType GhcPs) where
exact (HsSpliceTy a splice) = do
splice' <- markAnnotated splice
return (HsSpliceTy a splice')
+ exact (HsDocTy an ty doc) = do
+ ty' <- markAnnotated ty
+ doc' <- markAnnotated doc
+ return (HsDocTy an ty' doc')
exact (HsBangTy an (HsSrcBang mt up str) ty) = do
an0 <-
case mt of
diff --git a/utils/check-exact/Main.hs b/utils/check-exact/Main.hs
index f286355cc1..ab12ac4c09 100644
--- a/utils/check-exact/Main.hs
+++ b/utils/check-exact/Main.hs
@@ -59,7 +59,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/master/_b
-- "../../testsuite/tests/ghc-api/exactprint/AddDecl2.hs" (Just changeAddDecl2)
-- "../../testsuite/tests/ghc-api/exactprint/AddDecl3.hs" (Just changeAddDecl3)
-- "../../testsuite/tests/ghc-api/exactprint/LocalDecls.hs" (Just changeLocalDecls)
- "../../testsuite/tests/ghc-api/exactprint/LocalDecls2.hs" (Just changeLocalDecls2)
+ -- "../../testsuite/tests/ghc-api/exactprint/LocalDecls2.hs" (Just changeLocalDecls2)
-- "../../testsuite/tests/ghc-api/exactprint/WhereIn3a.hs" (Just changeWhereIn3a)
-- "../../testsuite/tests/ghc-api/exactprint/WhereIn3b.hs" (Just changeWhereIn3b)
-- "../../testsuite/tests/ghc-api/exactprint/AddLocalDecl1.hs" (Just addLocaLDecl1)
@@ -203,6 +203,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/master/_b
-- "../../testsuite/tests/ghc-api/exactprint/Test20239.hs" Nothing
-- "../../testsuite/tests/printer/PprArrowLambdaCase.hs" Nothing
-- "../../testsuite/tests/printer/Test16279.hs" Nothing
+ "../../testsuite/tests/printer/HsDocTy.hs" Nothing
-- cloneT does not need a test, function can be retired