On 12/7/11 5:03 AM, Simon Marlow wrote:
It would be possible, but it's not quite as straightforward as you might
think. Suppose you have a program like this:
xs = [1..10]
evens = filter ((==0) . (`mod` 2)) xs
and you fully evaluate "evens". Now, GHC will garbage collect "xs",
because it isn
On 07/12/11 15:16, Twan van Laarhoven wrote:
On 06/12/11 18:48, wren ng thornton wrote:
So, I have an optimization/internals question. Does the GHC API have any
hooks for being able to revert a CAF to the original expression, thus
discarding the previously computed result?
...
I could hack
On 06/12/11 18:48, wren ng thornton wrote:
So, I have an optimization/internals question. Does the GHC API have any
hooks for being able to revert a CAF to the original expression, thus
discarding the previously computed result?
...
I could hack something together based on unsafePerformIO and
On 06/12/2011 17:48, wren ng thornton wrote:
So, I have an optimization/internals question. Does the GHC API have any
hooks for being able to revert a CAF to the original expression, thus
discarding the previously computed result?
The reason I'm wanting this is that I have a particula
Can you use a weak pointer to do what you want?
If you keep a weak pointer to the head of your expensive list then
itwill be reclaimed at the next major GC I believe. I have used
weakpointers for vaugely similar purposes before.
I guess a downside is that they will always be reclaimed on GC even
if
List
| Subject: Revert a CAF?
|
| So, I have an optimization/internals question. Does the GHC API have any
| hooks for being able to revert a CAF to the original expression, thus
| discarding the previously computed result?
|
| The reason I'm wanting this is that I have a particular CAF w
So, I have an optimization/internals question. Does the GHC API have any
hooks for being able to revert a CAF to the original expression, thus
discarding the previously computed result?
The reason I'm wanting this is that I have a particular CAF which is an
infinite list. Unfolding that