<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">+1 I've been bitten by this several times. This is especially confusing when you are using Monoid in one module and you import a different module that happens to use the Semigroup variants, and vice versa.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 7:23 AM, Andrew Martin <span dir="ltr"><<a href="mailto:andrew.thaddeus@gmail.com" target="_blank">andrew.thaddeus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I agree somewhat. In the last two years, I've gotten more into the habit about being explicit with import lists for commonly-used modules like Control.Monad, Control.Applicative, and Data.Monoid. This is especially the case when I'm writing library code (that I expect that other people may read one day), although I'm more lax in application code. Still, it's nice to be able to fire up GHCi and do something like this without having to worry about conflicting identifiers:<div><br></div><div> >>> :m Data.Monoid Data.Semigroup</div><div><br></div><div>But yes, in theory, people should avoid this. In practice, they often don't.</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 3:12 AM, Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a><wbr>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
On Wed, 11 Apr 2018, Andrew Martin wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(As an aside, and the confusion I’m talking about here isn’t entirely hypothetical. I got tripped up by this when I first started using the semigroups library. I had to train myself to stop importing Data.Monoid unqualified, because it kept stealing these identifiers)<br>
</blockquote>
<br></span>
Unqualified imports are not the problem - unqualified imports without import list are the problem. People should not do that.</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-3190740526574238116gmail_signature" data-smartmail="gmail_signature">-Andrew Thaddeus Martin</div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>