Closed
Description
Bug imported from C2HS Trac
Trac ticket created: 2009-06-26T19:43:28-0700
Given an enumeration such as:
enum {
ENUMPFXSYS_NOTHING,
ENUMPFXSYS_FOO,
ENUMPFXSYS_BAR
} WeirdEnum;
The weird prefix makes typing the Haskell type constructors a pain. It's currently possible to remove the prefix entirely. However, this can cause conflicts with existing Haskell types (such as the "nothing" case above). It would be nice if the prefix could be replaced, not just removed.
Something like:
{#enum WeirdEnum as Weird with prefix = ENUMPFXSYS_ add prefix = Weird #}
which would generate the following Haskell code:
data Weird = WeirdNothing | WeirdFoo | WeirdBar