haskell / c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
http://hackage.haskell.org/package/c2hs
Other
199 stars 50 forks source link

Will there be a syntax for withArrayLen? #217

Closed Magicloud closed 5 years ago

Magicloud commented 5 years ago

Right now, I still have to write Haskell code with call or unexposed fun to wrap C functions that take array parameter. The structure of them are so similar, I think it is possible to make a c2hs syntax. Is it possible?

deech commented 5 years ago

Do you mean special syntax for something like void foo(bar* barArray, int barLen, ...)?

Magicloud commented 5 years ago

Yes.

Magicloud commented 5 years ago

Sorry. My mistake. Just learnt what & actually means. So this does not require a syntax to work.