[ghc-steering-committee] #409: Exportable named defaults, Recommendation: Partial Accept
Eric Seidel
eric at seidel.io
Wed Jun 9 00:43:27 UTC 2021
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
More information about the ghc-steering-committee
mailing list