
On Thu, 30 Sep 2010, Bas van Dijk wrote:
On Thu, Sep 30, 2010 at 5:15 PM, Christopher Done
wrote: ... One thing that makes figuring out a code base hard is when the code doesn't have explicit imports. Sometimes I can load the code in GHCi and inspect the symbols manually, sometimes I can't. If the import list explicitly said where stuff came from I wouldn't have to deal with this.
Indeed. I strictly use this style in all my projects. See the following for example:
http://hackage.haskell.org/packages/archive/usb/0.6.0.1/doc/html/src/System-...
I see it as a service to my readers. In order to find out where a symbol is coming from they only need to scroll up and look it up in the import list. Note that for further convenience I group the imports by package so they don't need to figure out which package exports what module.
It is also necessary when you want x.y.* style version dependencies on packages that follow the package versioning policy. http://www.haskell.org/haskellwiki/Import_modules_properly