If I have: > data MyType = MT { > x :: Int, > y :: Char > }
How do I update the Int value of MyType leaving the Char value unaffected? I tryied something like: > MT {x = newValue} but GHC gave me a warning about the Char value and it indeed caused strange effects. Of course, it is possible to do something like > update :: MyType -> Int -> MyType > update mt newValue = MT {x = newValue, y = oldValue} > where oldValue = y mt but this really annoys me when MyType has too many fields. Suggestions? Thanks a lot, -- Andre _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell