exporting functions which raise exceptions

Alastair Reid reid at cs.utah.edu
Thu Jun 13 07:49:55 EDT 2002

>> I couldn't see it in the spec and I'm working on the code that

> In the FFI Addendum, RC 4
> <http://www.cse.unsw.edu.au/~chak/haskell/ffi/>, Section 3.4,

Ah, thank you.

Hmmm, yet another 'undefined behaviour'.
I think I'd prefer that as 'implementation defined'.

> So, you are adding this to GHC? 

Hugs.  I figure if that Hugs is going to use the hierarchial libraries
it had better support the same ffi as GHC and NHC.

> When this issue was discussed earlier, I think, SimonM pointed out
> that (especially in the context of concurrency) it is hard to define
> what exactly is supposed to happen with such exceptions. 

I'm not sure I see the difficulty - but I'll go ahead and make up my
own solution (which will probably be much like what GreenCard does...)

Alastair Reid        reid at cs.utah.edu        http://www.cs.utah.edu/~reid/

More information about the FFI mailing list