This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Description
Has been reported upstream hsimport/#16. We have to wait for a new release, then this issue can be closed.
Example is roughly taken from stack new test haskeleton
Example.hs
-- | An example module.
module Example (main) where
-- | An example function.
main :: IO ()
main = return ()
foo :: IO ()
foo = do
_ <- async $ return ()
return ()
> hsimport -m "Control.Concurrent.Async" Example.hs
Output:
-- | An example module.
module Example (main) where
-- | An example function.
import Control.Concurrent.Async
main :: IO ()
main = return ()
foo :: IO ()
foo = do
_ <- async $ return ()
return ()
Expected:
-- | An example module.
module Example (main) where
import Control.Concurrent.Async
-- | An example function.
main :: IO ()
main = return ()
foo :: IO ()
foo = do
_ <- async $ return ()
return ()
Happens when using the code action to import a module.