@@ -121,14 +121,14 @@ processStdin = processHandle stdin
121121||| output and a new state. Returns Nothing if the repl should exit
122122partial
123123replWith : (state : a) -> (prompt : String) ->
124− (onInput : a -> String -> Maybe (String, a)) -> IO a
124+ (onInput : a -> String -> Maybe (String, a)) -> IO ()
125125replWith acc prompt fn
126126 = do putStr prompt
127127 x <- getLine
128128 case fn acc x of
129129 Just (out, acc') => do putStr out
130130 replWith acc' prompt fn
131− Nothing => return acc
131+ Nothing => return ()
132132
133133||| A basic read-eval-print loop
134134||| @ prompt the prompt to show
@@ -138,6 +138,5 @@ partial
138138repl : (prompt : String) ->
139139 (onInput : String -> String) -> IO ()
140140repl prompt fn
141− = do replWith () prompt (\x, s => Just (fn s, ()))
142− return ()
141+ = replWith () prompt (\x, s => Just (fn s, ()))
143142