diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T3219.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T3219.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T3219.hs b/testsuite/tests/typecheck/should_compile/T3219.hs new file mode 100644 index 0000000000..5c23c1727d --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T3219.hs @@ -0,0 +1,11 @@ +-- Trac #3219. Lint error in GHC 6.10 + +module T3219 where + +data T a = A{ m1 :: a } | B{ m1, m2 :: a } | C{ m2 :: a } + +-- bar :: (a -> a) -> T a -> T a +bar f x@(A m) = x{m1 = f m} + +-- foo :: (a -> a) -> T a -> T a +foo f x@(C m) = x{m2 = f m} |