You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not really clear how to support varargs exactly. The CAPI convention does have support varargs functions, but it's very limited: you have to specify a precise set of arguments, and ghc then generates a wrapper that takes precisely those arguments and in turn calls the original varargs function.
It's not really clear how to support varargs exactly. The
CAPI
convention does have support varargs functions, but it's very limited: you have to specify a precise set of arguments, andghc
then generates a wrapper that takes precisely those arguments and in turn calls the original varargs function.https://stackoverflow.com/questions/5989457/haskell-ffi-support-for-functions-with-variadic-arguments lists some options here; the most promising is perhaps using
libffi
to push an arbitrary number of arguments to the stack before calling the function (though obviously if we do go down this road we should provide a nice and type-safe API for this).We will need examples of what exactly is desirable before we can make progress here.
The text was updated successfully, but these errors were encountered: