@@ -32,18 +32,22 @@ import Data.Version
3232
3333repl :: IState -> [FilePath] -> Idris ()
3434repl orig mods
35− = do let prompt = mkPrompt mods
35+ = H.catch
36+ (do let prompt = mkPrompt mods
3637 x <- lift $ getInputLine (prompt ++ "> ")
3738 case x of
3839 Nothing -> do iputStrLn "Bye bye"
3940 return ()
40− Just input -> idrisCatch
41− (do ms <- processInput input orig mods
42− case ms of
41+ Just input -> H.catch
42+ (do ms <- processInput input orig mods
43+ case ms of
4344 Just mods -> repl orig mods
4445 Nothing -> return ())
45− (\e -> do iputStrLn (show e)
46− repl orig mods)
46+ ctrlC)
47+ ctrlC
48+ where ctrlC :: SomeException -> Idris ()
49+ ctrlC e = do iputStrLn (show e)
50+ repl orig mods
4751
4852mkPrompt [] = "Idris"
4953mkPrompt [x] = "*" ++ dropExtension x