haskell / hsc2hs

Pre-processor for .hsc files
http://hackage.haskell.org/package/hsc2hs
Other
38 stars 23 forks source link

Fix pointer type detection in cross mode #68

Closed TerrorJack closed 1 year ago

TerrorJack commented 2 years ago

Now, in cross mode, #type recognizes pointer type properly as CUIntPtr. Previously it would detect pointer types as a floating-point type incorrectly.

TerrorJack commented 1 year ago

This patch is needed to unblock GHC wasm CI for the upcoming 9.6 release. Waiting for @bgamari or other maintainers to come back and take a look at it.

bgamari commented 1 year ago

Yes, this does seem reasonable. The only case I can think of that we are still failing to handle would be const pointers, although I think it's fair to declare those as unsupported by #type.