[Git][ghc/ghc][wip/T16509-test] testsuite: Add test for #16509

Ben Gamari gitlab at gitlab.haskell.org
Tue May 28 03:16:28 UTC 2019



Ben Gamari pushed to branch wip/T16509-test at Glasgow Haskell Compiler / GHC


Commits:
e0159dec by Ben Gamari at 2019-05-28T03:16:20Z
testsuite: Add test for #16509

- - - - -


3 changed files:

- + testsuite/tests/patsyn/should_compile/T16509.hs
- + testsuite/tests/patsyn/should_compile/T16509.script
- testsuite/tests/patsyn/should_compile/all.T


Changes:

=====================================
testsuite/tests/patsyn/should_compile/T16509.hs
=====================================
@@ -0,0 +1,12 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# LANGUAGE ViewPatterns #-}
+
+module PatternPanic where
+
+pattern TestPat :: (Int, Int)
+pattern TestPat <- (isSameRef -> True, 0)
+
+isSameRef :: Int -> Bool
+isSameRef e | 0 <- e = True
+isSameRef _ = False
+


=====================================
testsuite/tests/patsyn/should_compile/T16509.script
=====================================
@@ -0,0 +1 @@
+:load T16509.hs


=====================================
testsuite/tests/patsyn/should_compile/all.T
=====================================
@@ -77,3 +77,4 @@ test('T14326', normal, compile, [''])
 test('T14394', normal, ghci_script, ['T14394.script'])
 test('T14552', normal, compile, [''])
 test('T14498', normal, compile, [''])
+test('T16509', normal, ghci_script, ['T16509.script'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/e0159dec2ba7ca5542e7c5eb45e4f9e57086381a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/e0159dec2ba7ca5542e7c5eb45e4f9e57086381a
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/20190527/4401170d/attachment.html>


More information about the ghc-commits mailing list