Initial implementation of case splitting

- It doesn't handle vars correctly yet
This commit is contained in:
Alejandro Serrano
2014-06-08 12:33:13 +02:00
parent 1e70c32b39
commit 6854d417c0
7 changed files with 132 additions and 2 deletions

View File

@@ -144,6 +144,7 @@ loop opt set mvar = do
"lint" -> toGhcMod $ lintStx opt set arg
"info" -> toGhcMod $ showInfo opt set arg
"type" -> toGhcMod $ showType opt set arg
"split" -> toGhcMod $ doSplit opt set arg
"boot" -> bootIt set
"browse" -> browseIt set arg
"quit" -> return ("quit", False, set)
@@ -254,6 +255,16 @@ showType opt set fileArg = do
ret <- types opt file (read line) (read column)
return (ret, True, set')
doSplit :: Options
-> Set FilePath
-> FilePath
-> Ghc (String, Bool, Set FilePath)
doSplit opt set fileArg = do
let [file, line, column] = words fileArg
set' <- newFileSet set file
ret <- splits opt file (read line) (read column)
return (ret, True, set')
----------------------------------------------------------------
bootIt :: Set FilePath