
6 Apr
2004
6 Apr
'04
11:24 a.m.
Graham Klyne wrote:
Please, no #ifdef's in standard library code! [...]
You're totally right, and I wouldn't propose this under normal circumstances, but in this special case it would be harmless: The #ifdefs would only exclude the import of Data.Monoid and a few instances of Monoid. So we have two cases to consider: a) The Haskell system in question supports Data.Monoid, so nothing would be excluded and all is well as before. b) Data.Monoid is not supported, so having no instances for Monoid would be a rather void statement here. :-) Either way, Ross has proposed a tiny change to make Data.Monoid portable, which would avoid the #ifdef problem altogether. Cheers, S.