diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-05-26 22:20:07 +0100 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2021-05-27 19:25:24 +0100 |
commit | 6de8ac892a8001d1a0f00c7b44a731f1f9f5c0b1 (patch) | |
tree | 01774790bd6cac7162bb4fc40d3b810e9cc1c367 /testsuite/tests/printer | |
parent | ce1b8f4208530fe6449506ba22e3a05048f81564 (diff) | |
download | haskell-6de8ac892a8001d1a0f00c7b44a731f1f9f5c0b1.tar.gz |
[EPA] exact print linear arrows.
Closes #19903
Note: the normal ppr does not reproduce unicode linear arrows, so that
part of the normal printing test is ommented out in the Makefile for
this test. See #18846
Diffstat (limited to 'testsuite/tests/printer')
-rw-r--r-- | testsuite/tests/printer/Makefile | 6 | ||||
-rw-r--r-- | testsuite/tests/printer/PprLinearArrow.hs | 26 | ||||
-rw-r--r-- | testsuite/tests/printer/all.T | 6 |
3 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/tests/printer/Makefile b/testsuite/tests/printer/Makefile index 1d0fc14f87..e8bbe7c079 100644 --- a/testsuite/tests/printer/Makefile +++ b/testsuite/tests/printer/Makefile @@ -558,6 +558,12 @@ InTreeAnnotations1: $(CHECK_PPR) $(LIBDIR) InTreeAnnotations1.hs $(CHECK_EXACT) $(LIBDIR) InTreeAnnotations1.hs +.PHONY: PprLinearArrow +PprLinearArrow: + # $(CHECK_PPR) $(LIBDIR) PprLinearArrow.hs + $(CHECK_EXACT) $(LIBDIR) PprLinearArrow.hs + + .PHONY: Test19784 Test19784: $(CHECK_PPR) $(LIBDIR) Test19784.hs diff --git a/testsuite/tests/printer/PprLinearArrow.hs b/testsuite/tests/printer/PprLinearArrow.hs new file mode 100644 index 0000000000..1bf995ce6d --- /dev/null +++ b/testsuite/tests/printer/PprLinearArrow.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE LinearTypes, DataKinds, UnicodeSyntax #-} + +module PprLinearArrow where + +import GHC.Types (Multiplicity(One, Many)) + +n1 :: a %1 -> b +n1 = undefined + +u1 :: a %1 → b +u1 = undefined + +n2 :: a %(Many) -> b +n2 = undefined + +u2 :: a %(Many) → b +u2 = undefined + +m3 :: a ⊸ b +m3 = undefined + +n4 :: a %p -> b +n4 = undefined + +u4 :: a %p → b +u4 = undefined diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T index 916ed6bbee..e936cdc64e 100644 --- a/testsuite/tests/printer/all.T +++ b/testsuite/tests/printer/all.T @@ -124,12 +124,18 @@ test('PprRecordDotSyntaxA', ignore_stderr, makefile_test, ['PprRecordDotSyntaxA' test('CommentsTest', ignore_stderr, makefile_test, ['CommentsTest']) test('InTreeAnnotations1', ignore_stderr, makefile_test, ['InTreeAnnotations1']) + +# Normal ppr does not reproduce unicode linear arrows, commented out +# in the Makefile for this test. See #18846 +test('PprLinearArrow', ignore_stderr, makefile_test, ['PprLinearArrow']) + test('Test19784', ignore_stderr, makefile_test, ['Test19784']) test('Test19798', ignore_stderr, makefile_test, ['Test19798']) # The exact printing manages the extra semicolons, normal ppr not, so # disabled in the Makefile for this test. test('Test19813', ignore_stderr, makefile_test, ['Test19813']) + test('Test19814', ignore_stderr, makefile_test, ['Test19814']) test('Test19821', ignore_stderr, makefile_test, ['Test19821']) test('Test19834', ignore_stderr, makefile_test, ['Test19834']) |