<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 5, 2015 at 9:02 PM, Erik Hesselink <span dir="ltr"><<a href="mailto:hesselink@gmail.com" target="_blank">hesselink@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 5 October 2015 at 20:58, Sven Panne <<a href="mailto:svenpanne@gmail.com">svenpanne@gmail.com</a>> wrote:<br>
> 2015-10-05 17:09 GMT+02:00 Gershom B <<a href="mailto:gershomb@gmail.com">gershomb@gmail.com</a>>:<br>
>><br>
</span><span class="">>> [...] As for libraries, it has been pointed out, I believe, that without<br>
>> CPP one can write instances compatible with AMP, and also with AMP + MRP.<br>
>> One can also write code, sans CPP, compatible with pre- and post- AMP. [...]<br>
><br>
> Nope, at least not if you care about -Wall: If you take e.g. (<$>) which is<br>
> now part of the Prelude, you can't simply import some compatibility module,<br>
> because GHC might tell you (rightfully) that that import is redundant,<br>
> because (<$>) is already visible through the Prelude. So you'll have to use<br>
> CPP to avoid that import on base >= 4.8, be it from it Data.Functor,<br>
> Control.Applicative or some compat-* module. And you'll have to use CPP in<br>
> each and every module using <$> then, unless I miss something obvious.<br>
> AFAICT all transitioning guides ignore -Wall and friends...<br>
<br>
</span>Does the hack mentioned on the GHC trac [1] work for this? It seems a<br>
bit fragile but that page says it works and it avoids CPP.<br></blockquote><div><br></div><div>No it doesn't, if you also don't want closed import lists (which you should).</div><div> </div></div></div></div>