haskell / hsc2hs

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

Allow floating-point constants when cross-compiling #91

Open sgillespie opened 3 months ago

sgillespie commented 3 months ago

Here's a fix for #90. I'm not sure exactly what the consequences are for changing static int test_array to int test_array, but it DOES seem to work in my tests.

I've been able to successfully test cross building with text-icu with this nix flake.

angerman commented 2 months ago

@sgillespie do we know why there was static in there in the first place? And even more crucially--I guess--, are we sure we don't break any existing code? I will conceide that hsc2hs and cross has been rather ... shaky.

sgillespie commented 2 months ago

do we know why there was static in there in the first place?

My guess is it's what autoconf does

are we sure we don't break any existing code?

Nope, I've only confirmed it seems to work with text-icu