--- helium-1.2/heliumNT/src/Makefile.in.orig 2004-01-22 08:04:57.000000000 -0200 +++ helium-1.2/heliumNT/src/Makefile.in 2004-02-05 18:33:35.000000000 -0200 @@ -256,7 +256,7 @@ @echo "****************************************************" @echo " TextHint: the textual Helium interpreter" @echo "****************************************************" - $(HC) $(HC_OPTS) --make -iutils -o $(HELIUMBINDIR)/texthint$(EXE) texthint/Main.hs + $(HC) $(HC_OPTS) --make -package util -iutils -o $(HELIUMBINDIR)/texthint$(EXE) texthint/Main.hs $(STRIP) $(HELIUMBINDIR)/texthint$(EXE) # AG sources --- helium-1.2/heliumNT/src/texthint/Main.hs.orig 2003-03-06 11:45:13.000000000 -0300 +++ helium-1.2/heliumNT/src/texthint/Main.hs 2004-02-05 18:40:08.000000000 -0200 @@ -2,6 +2,7 @@ import Char import List(isPrefixOf, isSuffixOf) +import Readline import Monad(when) import IO(stdout, hFlush) import System(system, getEnv, getArgs, exitWith, ExitCode(..)) @@ -64,6 +65,11 @@ cmdLoadModule (head args) initialState else return initialState + + -- Initialize readline + initialize + -- Deactivate filename completion + setCompletionEntryFunction (Just (const $ return [])) -- Enter read-eval-print loop loop stateAfterLoad @@ -79,9 +85,9 @@ loop :: State -> IO State loop state = do - putStr (prompt state) - hFlush stdout - command' <- getLine + command'' <- readline (prompt state) + let command' = maybe ":q" id command'' + addHistory command' let command = trim command' newState <- case command of (':':cmd:rest) ->