[Haskell-cafe] Re: Open unqualified imports

Simon Marlow marlowsd at gmail.com
Wed Feb 4 07:49:32 EST 2009


Ian Lynagh wrote:
> On Fri, Jan 16, 2009 at 06:42:46AM -0800, eyal.lotem at gmail.com wrote:
>> Closed-unqualified import:
>> import Data.Map(Map, lookup)
> 
> One problem with this style is that you can get lots of conflicts from
> your VCS if you have multiple people working on the same module.

Right; in GHC we actively discourage the use of explict import lists (or 
closed-unqualified import to use the terminology of this thread).

http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Imports

I find that the reasons not to use explicit import lists outweigh the 
reasons to use them, at least for code that I'm working on (rather than 
just reading).

Ideally the import lists would be maintained automatically by an IDE, and 
would be intelligently handled by the VCS.

Cheers,
	Simon


More information about the Haskell-Cafe mailing list