haskell / haskell/c2hs

Enum omit breaks mapping

Open
#161 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
211
Forks
52
PR merge metrics
No merged PRs in 30d

Description

Say I have an enum definied in C like this

``` c
enum MyEnum {
SomeA,
SomeB,
SomeC
};
```

Using `{# enum MyEnum {} omit (SomeB) #}` will result in

``` haskell
data MyEnum = SomeA
| SomeC
deriving (Enum)
```

Of course now the mapping is messed up since `SomeB` from C will map to `SomeC` in Haskell.

Edit: Using version `0.27.1 (29 Nov 2015)`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.