[Haskell-cafe] ANN: fix-imports-0.1.0

Evan Laforge qdunkan at gmail.com
Thu Jun 2 22:24:42 CEST 2011


I just uploaded a new package called fix-imports.

Maintaining the import block is one of the less fun things I do while
writing haskell.  So I wrote a little program to do that for me.
Basically, I edit source, then hit ,a in vim, and it figures out which
modules need to be imported, which imports are not needed, and sorts
and formats the import list.  I've been using it for the last week or
so and it seems to be working ok, so I decided to upload it to hackage
in case anyone else doesn't like maintaining import lists manually.

The catch: it only works for qualified imports.

Here's copy paste from the package description:

A small standalone program to manage the import block of a haskell
program. It will try to add import lines for qualified names with no
corresponding import, remove unused import lines, and sort the import
block according to some heuristic you can define. This only works for
qualified imports! Unqualified imports are left untouched.

It's most convenient if bound to an editor key.



More information about the Haskell-Cafe mailing list