<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">I’m catching up here.</p>
<p style="margin:0px 0px 1.2em!important">Let me share a few thoughts:</p>
<ul style="margin:1.2em 0px;padding-left:2em">
<li style="margin:0.5em 0px">I really want something like this (both for better <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">OverloadedList</code> support, and because it’s super useful in tests)</li>
<li style="margin:0.5em 0px">I’m rather unsure what to think about regarding the non-total priority (the fact that you can have <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">default C (A, B); default D (B, A)</code> and need to default a variable <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">x</code> with <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">(C x, D x)</code>). This sounds like something that must at least be specified. Am I correct that it isn’t?</li>
<li style="margin:0.5em 0px">There is no point in separating <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">NamedDefaults</code> and <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">ExportedDefaults</code> in two extensions</li>
<li style="margin:0.5em 0px">Regarding imports: in a first approximation explicit imports are useless. Having implicit imports lets me, for instance, define <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">default IsList ([])</code> in the prelude, and then turn <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">OverloadedList</code> on in <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">GHC2023</code> and not break existing programs. Yay. Explicit default imports just save me one copy-paste. Note by the way that if <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">GHC2023</code> is the target, then the extension to import defaults would also have to be included in <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">GHC2023</code>, so, basically, <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">ImportedDefaults</code> is practically useless, and we should just import defaults (I don’t think a warning would make much sense for a normal default behaviour; I agree with Simon that this is not worse than importing overloaded instances).</li>
</ul>
<p style="margin:0px 0px 1.2em!important">Still, there are some dark corners (I have pointed out one above, but I also find the exports and imports kind of difficult to wrap my head around).  So I guess the conversation is not over quite yet.</p>
<div title="MDH:PGRpdj5JJ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L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 9, 2021 at 2:44 AM Eric Seidel <<a href="mailto:eric@seidel.io">eric@seidel.io</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">On Tue, Jun 8, 2021, at 13:16, Richard Eisenberg wrote:<br>
> Perhaps even better (more precise) would be a warning when a <br>
> default was silently imported and a constraint of the class of the <br>
> default-import were defaulted.<br>
<br>
I think a warning is very reasonable, but I'm not sure about turning it on by default.<br>
<br>
IMO, far and away the biggest use case for ExportedDefaults will be the myriad Prelude replacements (and maybe someday even the Prelude itself). For those use cases I think it's quite important that the import be a clean one-liner like<br>
<br>
  import MyPrelude<br>
<br>
rather than<br>
<br>
  import MyPrelude<br>
  import MyPrelude (default IsString, default Num, ...)<br>
<br>
For other random modules that want to export defaults I feel much less strongly about the single import. Maybe that's an argument for a more baked-in way of installing a custom Prelude.<br>
<br>
Eric<br>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div>