diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2023-01-07 16:25:13 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-01-09 02:36:20 -0500 |
commit | 965a273510adfac4f041a31182c2fec82e614e47 (patch) | |
tree | 2ce9b1e9b2671a058f22fc6b070908d75035e812 /testsuite/tests | |
parent | 365b30453f0f7361edd40d32ebaa4bea784f3a2b (diff) | |
download | haskell-965a273510adfac4f041a31182c2fec82e614e47.tar.gz |
EPA: exact print HsDocTy
To match ghc-exactprint
https://github.com/alanz/ghc-exactprint/pull/121
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/printer/HsDocTy.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/printer/Makefile | 6 | ||||
-rw-r--r-- | testsuite/tests/printer/all.T | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/testsuite/tests/printer/HsDocTy.hs b/testsuite/tests/printer/HsDocTy.hs new file mode 100644 index 0000000000..7bcd985ed8 --- /dev/null +++ b/testsuite/tests/printer/HsDocTy.hs @@ -0,0 +1,6 @@ +{-# OPTIONS_GHC -haddock #-} +module HsDocTy where + +class C1 a where + f1 :: a -> Int + -- ^ comment on Int diff --git a/testsuite/tests/printer/Makefile b/testsuite/tests/printer/Makefile index ca29268693..e98cfc425c 100644 --- a/testsuite/tests/printer/Makefile +++ b/testsuite/tests/printer/Makefile @@ -769,3 +769,9 @@ Test21355: Test21805: $(CHECK_PPR) $(LIBDIR) Test21805.hs $(CHECK_EXACT) $(LIBDIR) Test21805.hs + +.PHONY: HsDocTy +HsDocTy: + # See comment on pprWithDocString, this won't round trip + # $(CHECK_PPR) $(LIBDIR) HsDocTy.hs + $(CHECK_EXACT) $(LIBDIR) HsDocTy.hs diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T index 620c92d5ba..050031c6a3 100644 --- a/testsuite/tests/printer/all.T +++ b/testsuite/tests/printer/all.T @@ -185,4 +185,5 @@ test('Test21805', [ignore_stderr, req_ppr_deps], makefile_test, ['Test21805']) test('T22488', normal, ghci_script, ['T22488.script']) test('T22488_docHead', normal, compile_and_run, ['-package ghc']) test('T20531', extra_files(['T20531_defs.hs']), ghci_script, ['T20531.script']) -test('T20531_red_ticks', extra_files(['T20531_defs.hs']), ghci_script, ['T20531_red_ticks.script'])
\ No newline at end of file +test('T20531_red_ticks', extra_files(['T20531_defs.hs']), ghci_script, ['T20531_red_ticks.script']) +test('HsDocTy', [ignore_stderr, req_ppr_deps], makefile_test, ['HsDocTy'])
\ No newline at end of file |