refactoring.

This commit is contained in:
Kazu Yamamoto 2013-02-18 13:48:57 +09:00
parent 8d512a3d97
commit 06cac206cd

View File

@ -83,7 +83,8 @@ main :: IO ()
main = flip catches handlers $ do
args <- getArgs
let (opt',cmdArg) = parseArgs argspec args
res <- modifyOptions opt' >>= \opt -> case safelist cmdArg 0 of
opt <- modifyOptions opt'
res <- case safelist cmdArg 0 of
"browse" -> concat <$> mapM (browseModule opt) (tail cmdArg)
"list" -> listModules opt
"check" -> withFile (checkSyntax opt) (safelist cmdArg 1)