'import M' is now the same as ':module +M' at the prompt
[ghc-hetmet.git] / compiler / ghci / InteractiveUI.hs
index 486d403..3bda8bd 100644 (file)
@@ -555,6 +555,7 @@ runCommandEval c = ghciHandle handleEval (doCommand c)
 runStmt :: String -> SingleStep -> GHCi Bool
 runStmt stmt step
  | null (filter (not.isSpace) stmt) = return False
+ | ["import", mod] <- words stmt    = keepGoing setContext ('+':mod)
  | otherwise
  = do st <- getGHCiState
       session <- getSession