[Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

Simon Marlow marlowsd at gmail.com
Wed Feb 8 10:25:47 CET 2012


On 08/02/2012 02:26, John Meacham wrote:
> On Tue, Feb 7, 2012 at 4:24 AM, Simon Marlow<marlowsd at gmail.com>  wrote:
>> Separately the unix package added support for undecoded FilePaths
>> (RawFilePath), but unfortunately at the same time we started using a new
>> extension in GHC 7.4.1 (CApiFFI), which we decided not to document because
>> it was still experimental:
>
> Hi, from my reading, it looks like 'capi' means from a logical perspective,
>
> "Don't assume the object is addressible, but rather that the standard c syntax
> for calling this routine will expand into correct code when compiled with the
> stated headers"
>
> So, it may be implemented by say creating a stub .c file that includes the
>   headers and creates a wrapper around each one or when compiling via C,
> actually including the given headers and the function calls in the code.

Yes, that's exactly it.  In GHC we create a stub (even when compiling 
via C, for simplicity of implementation).

Cheers,
	Simon


> I ask because jhc needs such a feature (very hacky method used now,
> the rts knows some problematic functions and includes hacky wrappers
> and #defines.) and I'll make it behave just like the ghc one when possible.
>
>     John




More information about the Haskell-Cafe mailing list