You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The enum instances generated by c2hs only define "toEnum :: Enum a => Int -> a" and "fromEnum :: Enum a => a -> Int", relying on the built-in definitions of succ, pred and enumFromTo, however all these built-in functions assume that an Enum matches a contiguous range of Int.
C enums on the other hand don't have this requirement. As a result the generated instance will crash for the Enum instances generated for any such enum. Simple example: