
14 Oct
2013
14 Oct
'13
4:07 a.m.
On Sun, Oct 13, 2013 at 12:20 AM, Herbert Valerio Riedel
unpackRLimit :: CRLim -> ResourceLimit unpackRLimit (#const RLIM_INFINITY) = ResourceLimitInfinity
[...]
I wonder though, how could that even have compiled in the past on OSX if the expanded RLIM_INFINITY macro #define in the LHS pattern wouldn't result in a simple number?
You'll want to take a look at what hsc2hs actually does here to really understand :-) In short, a constant C-level expression is fine if used in a #const construct, regardless of it containing embedded casts and whatnot.