<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 10, 2020 at 10:43 AM Joachim Breitner <<a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am surprised this is so controversial. There are many things in<br>
Haskell that are used that are not imported: <br>
<br>
* The desugaring of plain do notation (!)<br>
* The desugaring of if-then-else (no need to have True/False in scope)<br>
* The desugaring of boolean guards<br>
(again, no need to have True/False in scope)<br>
* Instances<br>
* And because of that, `foo.bar` according to RecordDotSyntax will<br>
not require `bar` to be in scope, as this is just an <br>
instance accessed via HasField "bar" (if I am not mistaken)<br>
<br>
In contrast, there is nothing where you have to import some `foo` when<br>
you don't actually mention `foo` in your source code.<br>
<br>
Which seems a pretty reasonable rule:<br>
Import the things you write; no more, no less!<br></blockquote><div><br></div><div>I wanted to add, for the record, that Joachim's argument convinced me that, indeed, were we to go for the module-qualified do approach, we probably shouldn't require the names to be in scope.</div><div><br></div><div>However, it makes the module-qualified approach more counter-intuitive to me: it doesn't make sense to me to use the namespace `M` to refer to a term which is not in this namespace. Obviously, Joachim, you have a different intuition about this.<br></div></div></div>