Was there a proposal/discussion to allow fully qualified symbols without adding them to the import list? E.g. just using Data.List.sortOn without adding the “import Data.List”. Thanks!
Not that I know — I have made a cursory search through the proposals and there seems to be nothing similar.
@k-bx same here: I think not. This may look like a rather nice idea, but I remember the discussion of Qualified Do where exactly this was mentioned as a rather undesirable feature that would require to parse the whole module instead of just the header (imports) to build the dependency graph. This is not to say that this may find support.
The reason I started thinking about it is that I’ve started one commercial project in Rust and that’s what’s available in Rust today, and it’s very neat, eliminates the “gigantic import section” Haskell isn’t unknown for. Of course, the big difference we have is that we don’t have package-centric imports (we import
Data.Aeson.Parser instead of
aeson.Parser), but I think it’s irreleant.
Anyways, I think this looks like a thing that wouldn’t overcomplicate the parsing tools too much, while giving a lot of benefit to people writing code.
I miss local imports so much.
f = import Foo.Bar in ...
I took the liberty of opening an issue on gitlab, for easier referencing. Let me know if there are any imprecisions.
That is great, thank you!