ForeignObj Finalizer in Hugs

KAKIHARA Norihiro YIU04646@nifty.com
Thu, 28 Jun 2001 20:16:50 +0900


Thank you for your detailed response!


> I wonder if you're being confused by the corresponding feature in GHC
> (also called ForeignObj) which goes a long way beyond what Hugs
> provides (and is a good deal harder to implement)?

Certainly I refered to the ForeignObj section in GHC manual.
However, I suppose Hugs current implementation is natural, and practical.



> (It is almost impossible to write a correct Haskell program that uses
> unsafeCoerce.  Anyone using it is almost certainly doing something
> very wrong.)

I see.  I will avoid using unsafeCoerce.



> That ought to work but foreign label hasn't been tested very
> thoroughly.  I'll try to get round to it sometime soon (but no
> promises).

I appreciate your intention!



> Sounds like foreign label may be broken.

Looking at the file generated by Hugs Green Card,
I can find a table of external functions.
They are not explicitly exported but correctly working.
Though they are declared as external, they are internal
for loaders of DLL.  My previous words may be the
confusion of interprocess communication problem and
inconsistent in that point.  So I think getDelFO is quite legal.