diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-05-16 14:58:45 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-23 02:07:36 -0400 |
commit | 406cd90b8863da640a9835d5d9972fff1c18dcd7 (patch) | |
tree | 7b287e1ce76efbbe9910734d4f4b5d7952815251 /testsuite/tests/printer | |
parent | 0b1eed74e8ad5194152ed656ac3e4a547726b70a (diff) | |
download | haskell-406cd90b8863da640a9835d5d9972fff1c18dcd7.tar.gz |
EPA: AnnAt missing for type application in patterns
Ensure that the exact print annotations accurately record the `@` for
code like
tyApp :: Con k a -> Proxy a
tyApp (Con @kx @ax (x :: Proxy ax)) = x :: Proxy (ax :: kx)
Closes #19850
Diffstat (limited to 'testsuite/tests/printer')
-rw-r--r-- | testsuite/tests/printer/Makefile | 5 | ||||
-rw-r--r-- | testsuite/tests/printer/Test19850.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/printer/all.T | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/printer/Makefile b/testsuite/tests/printer/Makefile index b6f05c16d1..1d0fc14f87 100644 --- a/testsuite/tests/printer/Makefile +++ b/testsuite/tests/printer/Makefile @@ -597,3 +597,8 @@ Test19839: Test19840: $(CHECK_PPR) $(LIBDIR) Test19840.hs $(CHECK_EXACT) $(LIBDIR) Test19840.hs + +.PHONY: Test19850 +Test19850: + $(CHECK_PPR) $(LIBDIR) Test19850.hs + $(CHECK_EXACT) $(LIBDIR) Test19850.hs diff --git a/testsuite/tests/printer/Test19850.hs b/testsuite/tests/printer/Test19850.hs new file mode 100644 index 0000000000..38dc156103 --- /dev/null +++ b/testsuite/tests/printer/Test19850.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE PatternSynonyms, ViewPatterns #-} +{-# LANGUAGE ImplicitParams #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE TypeApplications #-} + +module Test19850 where + +data Proxy (a :: k) = Proxy +data Con k (a :: k) = Con (Proxy a) + +tyApp :: Con k a -> Proxy a +tyApp (Con @kx @ax (x :: Proxy ax)) = x :: Proxy (ax :: kx) diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T index b868427bfd..916ed6bbee 100644 --- a/testsuite/tests/printer/all.T +++ b/testsuite/tests/printer/all.T @@ -135,3 +135,4 @@ test('Test19821', ignore_stderr, makefile_test, ['Test19821']) test('Test19834', ignore_stderr, makefile_test, ['Test19834']) test('Test19839', ignore_stderr, makefile_test, ['Test19839']) test('Test19840', ignore_stderr, makefile_test, ['Test19840']) +test('Test19850', ignore_stderr, makefile_test, ['Test19850']) |