28 Nov
2005
28 Nov
'05
4:14 p.m.
Johannes Waldmann <waldmann@imn.htwk-leipzig.de> writes:
Again, the concrete syntax problem is whether to hide the argument. Perhaps data Foo = Foo { foo :: Int, bar :: Int ; bar = 2 * foo self } with a reserved word "self" is better. - Are there semantic problems?
Can't you solve this by writing a fiunction to construct Foo with the desired properties? I.e. something like mkStdFoo f = Foo f (2*f) Or is there other functionality you would get by using records in this way? -k -- If I haven't seen further, it is by standing in the footprints of giants