Program to manage the imports of a haskell module
|Latest on Hackage:||1.1.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
the Config it passes in. There isn't much configurability but what there is
should be documented in the modules in which it is defined.
See the vimrc for an exmaple of how it can be bound to a key in vim.
It'll reformat the import lines, including an import list if you have one.
Sorry about that. The formatting style of Language.Haskell.Exts.prettyPrint
is not my personal style. If it ever bothers me enough maybe I'll write my
own formatter, or come up with a way to not reformat unqualified imports.
Also, it will search for modules starting from '.', so you should be in the
root of the module hierarchy. It wouldn't be hard to add a -i flag though.
haskell-src-exts will crash the program if it gets an ambigious operator
fixity parse. I don't know why it does that, but if you get a crash like that
you can add your custom operators to the Config.
It can be a little slow. Most of the time is haskell-src-exts parsing the
- Rename import-order to import-order-first, and add import-order-last.
support haskell-src-exts > 1.16
add ‘language’ field to .fix-imports, to turn on local extensions
1.0.3 and 1.0.4
- upgrade to haskell-src-exts-1.16
- Fix bug where a qualified import with >1 dot wasn’t found. And don’t mess with Prelude.
- Fix a bunch of bugs: properly recognize unqualified imports as imports, never import the current module, don’t pick up modules with the same suffix but a different name.
Change name from FixImports to fix-imports, which is more unixy.
Change ghc-pkg parsing from String to Text. It’s noticeably faster.
Add a more flexible system for prioritizing imports. When there are several possibilities for a module name, they are all given to a single function to decide. The config file moved from fix-imports-priority to .fix-imports and can now specify sort orders for packages and modules by prefix.
Make -i includes for non-existent dirs ignored instead of causing an error.