scripts to automatically manage imports or refactor modules

人走茶凉 提交于 2020-01-01 10:49:08

问题


Does anyone know of tools to manage Haskell imports? Sometimes, I want to refactor things by moving them to another file, and a script to generate the minimal set of imports [for the new file] would be nice.


回答1:


GHC can tell you which imports are required; simply add the -fwarn-unused-imports flag.




回答2:


There's a program called fix-imports that can generate a minimal set of imports for you. It only works for qualified imports, though.



来源:https://stackoverflow.com/questions/6756477/scripts-to-automatically-manage-imports-or-refactor-modules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!