On Sun, Oct 13, 2013 at 12:20 AM, Herbert Valerio Riedel <[email protected]>wrote:

> >  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.
_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to