[Haskell-cafe] Suggestions for #defines with FFI
jgoerzen at complete.org
Wed Jul 27 14:28:38 EDT 2005
I'm writing a Haskell interface to a library that #defines about 100
constants corresponding to numeric exit codes. It also defines hundreds
of contants, over the same numbering ranges, for other purposes. The
exit codes are non-contiguous as well.
So my question is: is there a nice way I can represent this in Haskell,
preferably without having to key in all 100 constants? Or will I just
have to list all the options and give up type checking to differentiate
one purpose of a constant from another?
More information about the Haskell-Cafe