16 Nov
2004
16 Nov
'04
4:07 p.m.
On Tue, 16 Nov 2004 15:04:02 +0000, Ian Lynagh <igloo@earth.li> wrote:
Is there a good reason why I can't say
data Bar = Bar { _ :: Int, _ :: Char, x :: Bool }
Since you only want one field out of many, what is the difficulty in simply defining the projection/updating functions separately? data Bar = Bar Int Char Bool x (Bar _ _ b) = b (Bar i c _) `updX` b = Bar i c b Regards, Malcolm