Hi,
Am Montag, den 05.11.2012, 23:34 +0100 schrieb Peter Divianszky:
Good remark, this can be solved with weak pointers, although I don't
know how efficient they are.
--
The next version of the proposal
Replace every record update
r' = r { x = y }
with
Hi,
Am Samstag, den 03.11.2012, 11:26 +0100 schrieb Peter Divianszky:
This can be implemented by replacing every record update
r' = r { x = y }
with
r' = r { x = unsafePerformIO (cond-update r r' (x r) y) }
where we keep the current record update mechanism and implement
Hi,
I have a question about sharing at the Haskell run-time level.
Suppose we have a record update
r { x = f (r x)}
and suppose that most of the time f returns it's argument unchanged.
I have the following questions:
1. Does the generated code for the record update build an identical
On 03.11.12 10:05 AM, Peter Divianszky wrote:
Suppose we have a record update
r { x = f (r x)}
and suppose that most of the time f returns it's argument unchanged.
Recently I've heard about Q-combinators.
Central idea: Change (f :: a - a) to (f' :: a - Maybe a) returning
On 03/11/2012 10:47, Andreas Abel wrote:
On 03.11.12 10:05 AM, Peter Divianszky wrote:
Suppose we have a record update
r { x = f (r x)}
and suppose that most of the time f returns it's argument unchanged.
Recently I've heard about Q-combinators.
Central idea: Change (f :: a - a)
On 03/11/2012 11:20, Peter Divianszky wrote:
On 03/11/2012 10:47, Andreas Abel wrote:
On 03.11.12 10:05 AM, Peter Divianszky wrote:
Suppose we have a record update
r { x = f (r x)}
and suppose that most of the time f returns it's argument unchanged.
Recently I've heard about
On 2012-11-03T10:05+0100, Peter Divianszky wrote:
Suppose we have a record update
r { x = f (r x)}
Hi Peter,
I think you mean this:
r { x = f (x r) }
1. Does the generated code for the record update build an identical
record when f returns it's argument unchanged instead of sharing
Hi Dennis,
I think you mean this:
r { x = f (x r) }
Yes, I made a typo.
Thanks for advising ghc-vis.
In GHC: In your example a new record is built, but all its entries (x in
this case) are shared.
The problem is, that in case of nested records, if an inner record is
updated, the