Commit 429fafb5 authored by Ryan Scott's avatar Ryan Scott
Browse files

Add regression test for #14326

Commit 6b77914c wound up
fixing #14326. Let's add a regression test so that it stays
that way.
parent d8d87fa2
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ExplicitForAll #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module T14326 where
data E a b = L' a | R b
pattern L :: forall b a. a -> E a b
pattern L a = L' a
{-# COMPLETE L, R #-}
testMono :: E (E Int Int) Int -> Int
testMono x = case x of
L (L _) -> 0
L (R _) -> 1
R _ -> 2
testPoly :: E (E a b) c -> Int
testPoly x = case x of
L (L _) -> 0
L (R _) -> 1
R _ -> 2
......@@ -73,3 +73,4 @@ test('T13752a', normal, compile, [''])
test('T13768', normal, compile, [''])
test('T14058', [extra_files(['T14058.hs', 'T14058a.hs'])],
multimod_compile, ['T14058', '-v0'])
test('T14326', normal, compile, [''])
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