Closed hth313 closed 7 years ago
Can you share what the enum looked like?
I cut down the code a bit, here is the header file:
enum Tags { x };
And here is the .chs
file:
#include "foo.h"
{#enum Tags {} #}
The problem disappears if I add a module line in the .chs
file.
LGTM. In your example, c2hs has no issue with generating a constructor x
which obviously won't compile.
To get valid haskell, this could be used;
{#enum Tags {upcaseFirstLetter} #}
I had this crash when trying to generate Haskell code for a simple enum.
The posRow selector only works on Position data, and apparently I got something else. As it had a Maybe wrapped around it, I simply allow it to become Nothing to avoid the crash. I am not sure how it blends with the code there, but the generated output looks fine.
Håkan