RE: unsafePerformIO around FFI calls

2002-07-09 Thread Simon Marlow
Hal Daume [EMAIL PROTECTED] writes: I'm curious exactly what is safe and what is unsafe to wrap unsafePerformIO around when it comes to FFI calls. Here's a simple test: Could you imagine an alternative implementation of the same API in pure Haskell? (Don't consider efficiency or

Re: unsafePerformIO around FFI calls

2002-07-09 Thread Alastair Reid
That's a nice succinct way to describe it. Another way, which boils down to the same thing but which is a little more concrete, is to ask: - Does the function's result depend only on the values of its arguments? I have two problems with this alternative test: 1) It is sometimes

RE: unsafePerformIO around FFI calls

2002-07-09 Thread Simon Marlow
That's a nice succinct way to describe it. Another way, which boils down to the same thing but which is a little more concrete, is to ask: - Does the function's result depend only on the values of its arguments? I have two problems with this alternative test: 1) It is

unsafePerformIO around FFI calls

2002-07-08 Thread Hal Daume III
I'm curious exactly what is safe and what is unsafe to wrap unsafePerformIO around when it comes to FFI calls. If there's a general discussion of this somewhere and someone could send me a pointer that would be another acceptable solution. I googled for unsafePerformIO FFI but nothing relevant

Re: unsafePerformIO around FFI calls

2002-07-08 Thread Alastair Reid
Hal Daume [EMAIL PROTECTED] writes: I'm curious exactly what is safe and what is unsafe to wrap unsafePerformIO around when it comes to FFI calls. Here's a simple test: Could you imagine an alternative implementation of the same API in pure Haskell? (Don't consider efficiency or effort