summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T3219.hs
blob: 5c23c1727d0ffc55ffc85afc5f0f1addbb116be8 (plain)
1
2
3
4
5
6
7
8
9
10
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}