@@ -32,18 +32,22 @@ import Data.Version
33repl :: IState -> [FilePath] -> Idris ()
33repl :: IState -> [FilePath] -> Idris ()
34repl orig mods
34repl orig mods
35− = do let prompt = mkPrompt mods
36+ (do let prompt = mkPrompt mods
36 x <- lift $ getInputLine (prompt ++ "> ")
37 x <- lift $ getInputLine (prompt ++ "> ")
38 Nothing -> do iputStrLn "Bye bye"
39 Nothing -> do iputStrLn "Bye bye"
40− Just input -> idrisCatch
41+ Just input -> H.catch
41− (do ms <- processInput input orig mods
42+ (do ms <- processInput input orig mods
42− case ms of
43+ case ms of
43 Just mods -> repl orig mods
44 Just mods -> repl orig mods
44 Nothing -> return ())
45 Nothing -> return ())
48+ where ctrlC :: SomeException -> Idris ()
45− (\e -> do iputStrLn (show e)
49+ ctrlC e = do iputStrLn (show e)
46− repl orig mods)
50+ repl orig mods
48mkPrompt [] = "Idris"
52mkPrompt [] = "Idris"
49mkPrompt [x] = "*" ++ dropExtension x
53mkPrompt [x] = "*" ++ dropExtension x