RE: ANN: H98 FFI Addendum 1.0, Release Candidate 10
I'm not following this. what exactly is derefPtr? The only analogous function I can think of is Foreign.peek:
Sorry, I meant peek.
but peek will unmarshal the value at the end of the Ptr into T, so T cannot be abstract.
Sorry, I was just trying to show how to create a value of type T which might be bottom. It would have been easier to use:
t :: T t = undefined
Ok. But I still don't understand why the whole discussion isn't moot. I can't see how to acquire a value of type T that isn't bottom. Could you give an example? Cheers, Simon
On 02-Jun-2003, Simon Marlow <simonmar@microsoft.com> wrote:
I can't see how to acquire a value of type T that isn't bottom.
By calling a function defined using the FFI, of course. -- Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit The University of Melbourne | of excellence is a lethal habit" WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
On Monday 02 June 2003 2:32 pm, Simon Marlow wrote:
Ok. But I still don't understand why the whole discussion isn't moot. I can't see how to acquire a value of type T that isn't bottom.
Whether you can acquire values of this type or not, we need to give it a semantics. We know that T must contain bottom. I'd argue that even if we can't manipulate or observe them, the semantics should admit that the type contains a bunch of other (foreign) values because it is more accurate and having an accurate semantics is bound to pay off.
Could you give an example?
No , I probably can't come up with an example as things stand at the moment. But who knows what changes we might make in the future and when we do, we're bound to do better if our semantics relfects reality instead of relying on a trick. -- Alastair
participants (3)
-
Alastair Reid -
Fergus Henderson -
Simon Marlow