Merge pull request #368 from houshuang/set

Adding empty case to set
This commit is contained in:
Andrew Gibiansky 2015-02-23 15:53:34 -08:00
commit 2df2b64e9e

View File

@ -403,6 +403,17 @@ evalCommand _ (Module contents) state = wrapExecution state $ do
-- | Directives set via `:set`.
evalCommand output (Directive SetDynFlag flags) state =
case words flags of
[] -> do
write "Help for setting flags"
return EvalOut {
evalStatus = Success,
evalResult = Display [plain "You can use the :set command to set IHaskell flags, and GHC flags"],
evalState = state,
evalPager = "",
evalComms = []
}
-- For a single flag.
[flag] -> do
write $ "DynFlags: " ++ flags