Commit 4f2afe1e authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

testsuite: Add test for #11959

Test Plan: Validate, expected to fail

Reviewers: goldfire, austin

Reviewed By: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2132

GHC Trac Issues: #11959
parent b75d1940
{-# LANGUAGE PatternSynonyms #-}
module Main where
import T11959Lib (Vec2(..), pattern (:>))
main = return ()
T11959Lib.hs:2:35: warning: [-Wduplicate-exports (in -Wdefault)]
‘:>’ is exported by ‘(:>)’ and ‘Vec2(Nil, type (:>))’
{-# LANGUAGE PatternSynonyms, ViewPatterns #-}
module T11959Lib (Vec2(Nil,(:>)), pattern (:>)) where
newtype Vec2 a = Vec2 {unvec2 :: [a]}
pattern Nil :: Vec2 a
pattern Nil = Vec2 []
pattern (:>) x xs <- ((\ys -> (head $ unvec2 ys,Vec2 . tail $ unvec2 ys)) -> (x,xs))
where
(:>) x xs = Vec2 (x:unvec2 xs)
......@@ -52,3 +52,4 @@ test('T11336', normal, compile, [''])
test('T11367', normal, compile, [''])
test('T11351', normal, compile, [''])
test('T11633', normal, compile, [''])
test('T11959', expect_broken(11959), multimod_compile, ['T11959', '-v0'])
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment