View | Details | Raw Unified
Collapse All | Expand All

(-) helium-1.2/heliumNT/src/texthint/Main.hs.orig (-4 / +10 lines)
 Lines 256-262    Link Here 
	@echo "****************************************************"
	@echo "****************************************************"
	@echo "  TextHint: the textual Helium interpreter"
	@echo "  TextHint: the textual Helium interpreter"
	@echo "****************************************************"
	@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)
	$(STRIP) $(HELIUMBINDIR)/texthint$(EXE)
# AG sources
# AG sources
 Lines 2-7    Link Here 
import Char
import Char
import List(isPrefixOf, isSuffixOf)
import List(isPrefixOf, isSuffixOf)
import Readline
import Monad(when)
import Monad(when)
import IO(stdout, hFlush)
import IO(stdout, hFlush)
import System(system, getEnv, getArgs, exitWith, ExitCode(..))  
import System(system, getEnv, getArgs, exitWith, ExitCode(..))  
 Lines 64-69    Link Here 
            cmdLoadModule (head args) initialState
            cmdLoadModule (head args) initialState
        else
        else
            return initialState
            return initialState
    -- Initialize readline
    initialize
    -- Deactivate filename completion
    setCompletionEntryFunction (Just (const $ return []))
            
            
    -- Enter read-eval-print loop            
    -- Enter read-eval-print loop            
    loop stateAfterLoad
    loop stateAfterLoad
 Lines 79-87    Link Here 
loop :: State -> IO State
loop :: State -> IO State
loop state = do
loop state = do
    putStr (prompt state)
    command'' <- readline (prompt state)
    hFlush stdout
    let command' = maybe ":q" id command''
    command' <- getLine
    addHistory command'
    let command = trim command'
    let command = trim command'
    newState <- case command of
    newState <- case command of
        (':':cmd:rest) -> 
        (':':cmd:rest) ->