Suppose you have a C API provides that provides a C struct and a function that populates it: For example, this could be a getter for some inform ...
Suppose you have a C API provides that provides a C struct and a function that populates it: For example, this could be a getter for some inform ...
While writing a Haskell binding for some libs written in C, a thing has to do is writing docs in haddock format. But since normally the binding is jus ...
I have some #IF and #ENDIF in .hs. If I just rename the file to .chs, the #IF and #ENDIF are just moved to .h generated by c2hs instead of the .hs gen ...
i try to understand the difference between c2hs and gtk2hsC2hs (modified version of c2hs for use in gtk2hs). Consider the following coding: The sec ...
Consider from the c2hs documentation that this: generates in Haskell which binds the following C function: Problem: Here I'm confused what th ...
I have the following C function that I want to call from Haskell: The function is supposed to receive some property_list_t and populate some values ...
I'm new to using c2hs and having this issue. I'm not sure how to start debugging this, and haven't found anything with a Google search or by looking ...
Setting A C enum type rendered into Haskell by c2hs, complete with Storable instance which compiles correctly (TypesC2Hs.chs). I import this unqualif ...
When writing the Storable instance of a C enum that has 5 options (using c2hs), the {# sizeof #} macro returns 4 (i.e. 4 bytes). Isn't this extremely ...
I am trying to call the following C function from Haskell using c2hs. I am not familiar with c2hs and am having troubles with declaring bindings. ...
I'm trying to install gtk via cabal, however, I'm getting the following type errors when building it To install this package, you need "gtk2hsC2hs" ...
I am trying out c2hs, and wanted to compile a small example of a shared library with Cabal to get started. I have the following relevant section of t ...
I'm trying to bind to a C function that returns a struct (by value). I know I can wrap it manually using the FFI, but can't figure out how to coax c2h ...
I'm figuring out how haskell-mpi works by rewriting the binding. I'm trying to re-use the MPICH installation that was set up by installing PETSc (whic ...
I'd like to wrap a function-like C macro in a C function (and in turn wrap it in Haskell with a {#fun ... #} block), but the c2hs preprocessor chokes ...
I'm looking at the haskell-mpi binding, and we have e.g. this signature in mpi.h: which in Internal.chs is represented as follows: Q: I have so ...
I build and run the following minimal example (no external dependencies) with C->Haskell Compiler, version 0.25.2 Snowboundest, 31 Oct 2014 build p ...
I'm building a software that needs nvcc for compilation. I don't have a CUDA-capable GPU, but actually I don't need that – a friend is building the ex ...
How would one go about encoding this chunk of C code in a .chs file so that c2hs can transform it to something relatively nice? ...
I have a problem where cabal will not do dependency resolution on .chs files, that is, if A.chs depends on B.chs (or really B.chi) then cabal will not ...