[Haskell-cafe] Re: Nofib modifications

Neil Mitchell ndmitchell at gmail.com
Tue Dec 4 13:45:33 EST 2007


Hi

> I'd do something like
>
> #if defined(__nhc98__) || defined(YHC)
> #define NO_MONOMORPHISM_RESTRICTION
> #endif
>
> #ifdef NO_MONOMORPHISM_RESTRICTION
> powers :: [[Integer]]
> #endif
>
> just to make it quite clear what's going on.  (good comments would do just
> as well).

I'd rather avoid CPP, as Hugs doesn't have CPP by default (certainly
on Windows), so it would make it a little harder to run with Hugs.

I am happy to write comments such as:

-- only required for compilers that fail to correctly implement the
monomorphism restriction

Thanks

Neil


More information about the Haskell-Cafe mailing list