[Git][ghc/ghc][wip/or-pats] Add EPA test
David (@knothed)
gitlab at gitlab.haskell.org
Thu Jan 26 11:51:35 UTC 2023
David pushed to branch wip/or-pats at Glasgow Haskell Compiler / GHC
Commits:
e51bf5ea by David Knothe at 2023-01-26T12:51:29+01:00
Add EPA test
- - - - -
3 changed files:
- testsuite/tests/printer/Makefile
- + testsuite/tests/printer/PprOrPat.hs
- testsuite/tests/printer/all.T
Changes:
=====================================
testsuite/tests/printer/Makefile
=====================================
@@ -729,6 +729,11 @@ PprCommentPlacement2:
$(CHECK_PPR) $(LIBDIR) PprCommentPlacement2.hs
$(CHECK_EXACT) $(LIBDIR) PprCommentPlacement2.hs
+.PHONY: PprOrPat
+PprOrPat:
+ $(CHECK_PPR) $(LIBDIR) PprOrPat.hs
+ $(CHECK_EXACT) $(LIBDIR) PprOrPat.hs
+
.PHONY: Test20243
Test20243:
$(CHECK_PPR) $(LIBDIR) Test20243.hs
=====================================
testsuite/tests/printer/PprOrPat.hs
=====================================
@@ -0,0 +1,15 @@
+{-# LANGUAGE OrPatterns #-}
+{-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE PatternSynonyms #-}
+
+module Main where
+
+a = case [1] of
+ [1,2,3] -> True
+ ( one {- 01-} of
+ {- 12 -} [4, 5] , [6,7 {- lol -}] {-test-}
+ ) -> False
+
+pattern A <- (one of ({-hmm-} reverse -> {-e-}( {-f-} one of [2,1], 0:_ )), id -> []) {-123-}
+b = case [1,2] of A -> True
+
=====================================
testsuite/tests/printer/all.T
=====================================
@@ -171,6 +171,7 @@ test('PprT13747', [ignore_stderr, req_ppr_deps], makefile_test, ['PprT13747'])
test('PprBracesSemiDataDecl', [ignore_stderr, req_ppr_deps], makefile_test, ['PprBracesSemiDataDecl'])
test('PprUnicodeSyntax', [ignore_stderr, req_ppr_deps], makefile_test, ['PprUnicodeSyntax'])
test('PprCommentPlacement2', [ignore_stderr, req_ppr_deps], makefile_test, ['PprCommentPlacement2'])
+test('PprOrPat', [ignore_stderr, req_ppr_deps], makefile_test, ['PprOrPat'])
test('Test20243', [ignore_stderr, req_ppr_deps], makefile_test, ['Test20243'])
test('Test20247', [ignore_stderr, req_ppr_deps], makefile_test, ['Test20247'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e51bf5ea38f811cdac196735778bd2a0d0ecf8a8
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e51bf5ea38f811cdac196735778bd2a0d0ecf8a8
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230126/030080c7/attachment-0001.html>
More information about the ghc-commits
mailing list