I’m catching up here.

Let me share a few thoughts:

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.


On Wed, Jun 9, 2021 at 2:44 AM Eric Seidel <eric@seidel.io> wrote:
On Tue, Jun 8, 2021, at 13:16, Richard Eisenberg wrote:
> Perhaps even better (more precise) would be a warning when a
> default was silently imported and a constraint of the class of the
> default-import were defaulted.

I think a warning is very reasonable, but I'm not sure about turning it on by default.

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

  import MyPrelude

rather than

  import MyPrelude
  import MyPrelude (default IsString, default Num, ...)

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.

Eric
_______________________________________________
ghc-steering-committee mailing list
ghc-steering-committee@haskell.org
https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee