haskell/c2hs — pull request #66 by anton-dessiatov (2014-03-04 04:42:26+00:00)
Title: Support for trivial integral type casts in constant expressions

Earlier version of c2hs didn't support C type casts in constant expressions like following: ((DWORD)0x1L). This was troublesome on Windows where resource-generation tools create exactly these declarations. Proposed patch adds the ability to parse such constants. It doesn't handle overflows and unsigned/signed conversions (e.g. it won't parse ((DWORD)-1) as 0xFFFFFFFF, but rather wil parse it as -1, despite being unsigned), but still is very handy.

Please merge it and upload new c2hs to hackage for the great good!