<div dir="ltr">Thanks for weighing in. It is possible to use cabal flags + CPP to work around this, although I don't like doing that for the reasons you would expect. I'm also not typically comfortable opening up an issue to ask a package maintainer to add a flag to enable conditional dependencies for instances. I believe that there is precedent for pulling data types that offer a good abstraction into base (ie, moving Data.Functor.* from transformers to base, moving Bifunctor into base), but I don't know exactly what threshold needs to be cleared to make a compelling argument for doing this.<div><br></div><div>-Andrew Martin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 16, 2016 at 2:49 PM, Ruben Astudillo <span dir="ltr"><<a href="mailto:ruben.astud@gmail.com" target="_blank">ruben.astud@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 16/10/16 11:21, Andrew Martin wrote:<br>
> The advantage this offers is that Free and Cofree would be able to<br>
> enjoy a greater number of typeclass instances provided libraries<br>
> across the ecosystem. As it stands, adding the somewhat heavy `free`<br>
> dependency is not a good choice for libraries like `aeson`,<br>
> `mustache`, and `hashable`. In the case of Fix, the ecosystem<br>
> currently lacks a canonical library that provides it<br>
> (recursion-schemes and data-fix both offer the same definition though,<br>
> and various tutorials all define it the same way). It could benefit<br>
> from the new instances as well.<br>
<br>
</span>This is a problem I see a lot, having to pull a "heavy" dependency to<br>
implement an instance and avoid orphans. I don't favor making a monolith<br>
in `base` for this, it goes against modularity and is a maintainer risk<br>
for base. Can cabal flags + CPP be abused to implement the instances on<br>
demand if the constrains are meet?. That would solve this problem at the<br>
cost of having to remember package-flags.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Ruben Astudillo<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">-Andrew Thaddeus Martin</div>
</div>