@@ -56,6 +56,7 @@ import qualified System.IO.UTF8 as U
5656 (writeFile, putStrLn, print, readFile)
5757import qualified Language.PureScript.Names as N
5858import qualified Language.PureScript.Declarations as D
59+import qualified Language.PureScript.Constants as C
5960
6061-- |
6162-- The PSCI state.
@@ -132,7 +133,7 @@ loadModule filename = either (Left . show) Right . P.runIndentParser filename P.
132133--
133134loadAllModules :: [FilePath] -> IO (Either ParseError [(Either P.RebuildPolicy FilePath, P.Module)])
134135loadAllModules files = do
135− filesAndContent <- forM files $ \filename -> do
136+ filesAndContent <- forM files $ \filename -> do
136137 content <- U.readFile filename
137138 return (Right filename, content)
138139 return $ P.parseModulesFromFiles (either (const "") id) $ (Left P.RebuildNever, P.prelude) : filesAndContent
@@ -444,7 +445,9 @@ handleCommand :: Command -> PSCI ()
444445handleCommand (Expression val) = handleDeclaration val
445446handleCommand Help = PSCI $ outputStrLn helpMessage
446447handleCommand (Import moduleName) = handleImport moduleName
447−handleCommand (Let l) = PSCI $ lift $ modify (updateLets l)
448+handleCommand (Let l) = do
449+ PSCI $ lift $ modify (updateLets l)
450+ handleDeclaration (D.Var (N.Qualified (Just $ N.ModuleName [N.ProperName C.prelude]) (N.Ident C.unit)))
448451handleCommand (LoadFile filePath) = do
449452 absPath <- psciIO $ expandTilde filePath
450453 exists <- psciIO $ doesFileExist absPath