importify icon indicating copy to clipboard operation
importify copied to clipboard

Feature request: Support adding imports "on the fly", based on which identifiers are used in code.

Open Wizek opened this issue 8 years ago • 1 comments

Creating because of the following reddit thread. https://www.reddit.com/r/haskell/comments/7777df/hack_importify_by_serokell_during_hacktoberfest/dojxjx1/?context=10000

An example:

  1. Initial file:

    main = print "hello"
    
  2. Then manually changed to:

    main = print =<< getCurrentTime
    
  3. Then the following import is automatically added:

    import Data.Time (getCurrentTime)
    
    main = print =<< getCurrentTime
    

Wizek avatar Oct 18 '17 19:10 Wizek

I wrote this in the comment section to other issue but this issue description looks better so I close previous issue as duplicate.

Thanks for creating issue! But first we need to simply support adding imports... There's such tool halberd which can add missing imports. But it's not maintained. And its interface is not very convenient...

chshersh avatar Oct 18 '17 19:10 chshersh