Re: [polyml] Using a finalizer with multiple arguments

2015-09-17 Thread Phil Clayton
16/09/15 12:40, David Matthews wrote: On 15/09/2015 22:18, Phil Clayton wrote: I think weak references could do the job. Better still, I may be able to adapt (shamelessly copy) MLtonFinalizable: https://github.com/MLton/mlton/blob/master/basis-library/mlton/finalizable.sig https://github.com/

Re: [polyml] Using a finalizer with multiple arguments

2015-09-17 Thread Phil Clayton
Thanks for the example - it was a useful to see how to use the Thread structure. And to see how easy it was. That's a nice library. Attached is a first stab at implementing the FINALIZABLE signature shown below, which is identical to MLTON_FINALIZABLE. The code is based on the MLton impleme

Re: [polyml] Using a finalizer with multiple arguments

2015-09-17 Thread David Matthews
On 17/09/2015 11:50, Phil Clayton wrote: Thanks for the example - it was a useful to see how to use the Thread structure. And to see how easy it was. That's a nice library. Attached is a first stab at implementing the FINALIZABLE signature shown below, which is identical to MLTON_FINALIZABLE.

Re: [polyml] Using a finalizer with multiple arguments

2015-09-17 Thread Phil Clayton
17/09/15 16:12, David Matthews wrote: On 17/09/2015 11:50, Phil Clayton wrote: Thanks for the example - it was a useful to see how to use the Thread structure. And to see how easy it was. That's a nice library. Attached is a first stab at implementing the FINALIZABLE signature shown below, wh

Re: [polyml] Using a finalizer with multiple arguments

2015-09-17 Thread Matthew Fluet
On Thu, Sep 17, 2015 at 6:48 AM, Phil Clayton wrote: > 16/09/15 12:40, David Matthews wrote: >> >> On 15/09/2015 22:18, Phil Clayton wrote: >>> >>> I was wondering how to implement the 'touch' function of >>> MLTON_FINALIZABLE that forces a weak reference to stay alive. The >>> expression >>>