<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 25, 2021, at 3:09 PM, Alejandro Serrano Mena <<a href="mailto:trupill@gmail.com" class="">trupill@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">- I am not sure of the benefit of allowing (1), compared with the possible surprise of users.</div><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">- I do not fully understand (2).</div><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">- I think (3) would be great, if we ensure that nothing changes if I don’t use “qualified”, even if -XLocalModules is on.</div></div></blockquote></div><br class=""><div class="">If in the language, I would use (1) -- anonymous local modules -- regularly, when defining a function or class instance with a bunch of "local" helper functions. Of course, if we can't omit the module name, I will suffer no great harm.</div><div class=""><br class=""></div><div class="">I cannot offer the guarantee you seek in (3), but I don't think you want it. (If nothing changes, then the feature has no effect!) Here is a scenario where (3) could cause trouble:</div><div class=""><br class=""></div><div class=""></div><blockquote type="cite" class=""><div class="">import Data.Set as Set ( abcde )</div><div class=""><br class=""></div><div class="">data Set = Mk { abcdf :: Int }</div><div class=""><br class=""></div><div class="">blah = Set.abcdf</div></blockquote><div class=""><br class=""></div><div class="">Previously, GHC would have suggested that you perhaps misspelled abcde. Now, you'll get (presumably) a type error.</div><div class=""><br class=""></div><div class="">Here's another case:</div><div class=""><br class=""></div><div class=""></div><blockquote type="cite" class=""><div class="">import Data.Set as Set ( Set )</div><div class=""><br class=""></div><div class="">data Set = Mk</div><div class=""><br class=""></div><div class="">x :: Set.Set</div></blockquote><div class=""><br class=""></div><div class="">Everything is happy today, but with -XLocalModules (and (3)), the type of x is an ambiguous name.</div><div class=""><br class=""></div><div class="">Any example that causes trouble, though, will have something in common: an imported module name (possibly via an alias) that matches a locally defined type name. I would imagine this pattern is rare in practice, and that the benefit of (3) would outweigh the number of times that a problem like this bites.</div><div class=""><br class=""></div><div class="">I, too, could live without (2).</div><div class=""><br class=""></div><div class="">Richard</div></body></html>