Ticket #3219 (closed bug: fixed)
functions on records with overloaded names can be given a too-specific type
Description
Here's a reduced test-case showing a discrepancy between the symmetric functions foo and bar; the inferred type for foo is too specific.
data T a = A{ m1 :: a } | B{ m1, m2 :: a } | C{ m2 :: a }
-- bar :: (t -> a) -> T t -> 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}
Change History
Note: See
TracTickets for help on using
tickets.
