KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a library which uses C99 bool data type and I would like to call it via FFI. What is the corresponding type for C99 bool in Haskell? In Foreign.C.types there are CInt, CShort etc, but no CBool. If there is no "correct" type for bool , what is a safe alternative type to be passed in a function expecting a bool ? An alternative approach would be to modify the C library but I would like to keep it intact.
Tags (comma-separated)
Save Edits
Cancel