First attempt to add auto

This commit is contained in:
Alejandro Serrano
2014-08-01 17:08:23 +02:00
parent e3853a49f1
commit 9161757f95
6 changed files with 44 additions and 3 deletions

View File

@@ -131,6 +131,7 @@ loop set mvar = do
"split" -> doSplit set arg
"sig" -> doSig set arg
"refine" -> doRefine set arg
"auto" -> doAuto set arg
"boot" -> bootIt set
"browse" -> browseIt set arg
"quit" -> return ("quit", False, set)
@@ -271,6 +272,16 @@ doRefine set fileArg = do
ret <- refine file (read line) (read column) expr
return (ret, True, set')
doAuto :: IOish m
=> Set FilePath
-> FilePath
-> GhcModT m (String, Bool, Set FilePath)
doAuto set fileArg = do
let [file, line, column] = words fileArg
set' <- newFileSet set file
ret <- auto file (read line) (read column)
return (ret, True, set')
----------------------------------------------------------------
bootIt :: IOish m