[EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) wrote,
> Wed, 16 Aug 2000 08:06:59 -0700, Simon Marlow <[EMAIL PROTECTED]> pisze:
>
> > This is a problem we've known about for a while, and it's one reason
> > we have ForeignObj: because they're atomic heap objects and therefore
> > don't suffer from transformational bogosity.
>
> Oops. I think I understand now how ForeignObjs work.
>
> So they have to stay. ForeignObj users can use the generic wrapper
> foreignObjToPtr :: (Ptr a -> IO b) -> ForeignObj -> IO b
> instead of dedicated peek functions.
>From a users point of view, I like these functions that
basically delimit a block by having the stuff in the block
as a higher-order function, but I have two concerns:
* Shouldn't we use
foreignObjToPtr :: ForeignObj -> (Ptr a -> IO b) -> IO b
as it allows to write
foreignObjToPtr fptr $ \ptr -> do
...
...
* Does GHC usually do inlining here? In the marshalling
code for a single function, there can be quite lot of
these scopes being nested. Will this have implications on
program performance?
Simon, what do you reckon? Is it inlined usually?
Cheers,
Manuel
- Re: Accessing ForeignObj contents f... Marcin 'Qrczak' Kowalczyk
- RE: Accessing ForeignObj contents from Haskell Simon Marlow
- RE: Accessing ForeignObj contents from Hask... Manuel M. T. Chakravarty
- RE: Accessing ForeignObj contents from Haskell Simon Marlow
- Re: Accessing ForeignObj contents from Hask... Marcin 'Qrczak' Kowalczyk
- Re: Accessing ForeignObj contents from ... Manuel M. T. Chakravarty
- RE: Accessing ForeignObj contents from Haskell Simon Marlow
- Re: Accessing ForeignObj contents from Hask... Keith Wansbrough
- Re: Accessing ForeignObj contents from ... Marcin 'Qrczak' Kowalczyk
- Re: Accessing ForeignObj contents from Hask... Marcin 'Qrczak' Kowalczyk
- Re: Accessing ForeignObj contents from ... Manuel M. T. Chakravarty
- Re: Accessing ForeignObj contents f... Marcin 'Qrczak' Kowalczyk
- Re: Accessing ForeignObj conten... Manuel M. T. Chakravarty
- RE: Accessing ForeignObj contents from Hask... Axel Simon
- Re: Accessing ForeignObj contents from ... Marcin 'Qrczak' Kowalczyk
- Re: Accessing ForeignObj contents from ... Marcin 'Qrczak' Kowalczyk
- Re: Accessing ForeignObj contents f... Manuel M. T. Chakravarty
- Re: Accessing ForeignObj conten... Marcin 'Qrczak' Kowalczyk
- Re: Accessing ForeignObj c... Manuel M. T. Chakravarty
- Re: Accessing ForeignO... Marcin 'Qrczak' Kowalczyk
- RE: Accessing ForeignObj contents from ... Manuel M. T. Chakravarty
