When reading other people’s code, I found the following combination a good trade-off between succinctness and clarity:
- qualified imports
- concise names in imported modules (like @elaforge) suggested
- Haddock-generated source annotation that gives you the type and module as tool-tip and hyperlinks
100% agree with this advice. Writing modules with the assumption they will be imported qualified made a big improvement to my Haskell code.
It’s a great tool for reflecting context in the way I was talking about: in the context of the module itself, you use shorter names because it’s clear what the module is about; outside the module, you might have less context, so you would import the module qualified, with the module name providing context to the short identifier. It’s a win-win.