[Haskell-cafe] workarounds for Codec.Compression.Zlib errors in darcs

Jason Dagit dagit at codersbase.com
Wed Nov 26 18:32:18 EST 2008

On Wed, Nov 26, 2008 at 3:16 PM, Malcolm Wallace <
malcolm.wallace at cs.york.ac.uk> wrote:

> ... to work out the C types and then map them to Haskell ones, to
>> check they're the same as the declared types in the .hs files.
> I'd like to point out that the FFI specification already has such a
> mechanism.
> That is, if you use the optional specification of a header file for each
> foreign import, and if your Haskell compiler can compile via C, then any
> checking that types match between Haskell and C can be performed
> automatically, by the backend C compiler.
> [ OK, so that is not the whole story, and there are good reasons why it
> might not always work out, but I still think it was an important principle
> in the original FFI design. ]

Would this method work with return types since C compilers tend to let you
ignore those?  In this example that brought up this discussion it was in
fact an ignored return value that caused the problem.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081126/6a755328/attachment.htm

More information about the Haskell-Cafe mailing list