Commit a6600390 authored by Stian Håklev's avatar Stian Håklev

Adding case for empty list in :set

parent 50704ff6
...@@ -403,6 +403,17 @@ evalCommand _ (Module contents) state = wrapExecution state $ do ...@@ -403,6 +403,17 @@ evalCommand _ (Module contents) state = wrapExecution state $ do
-- | Directives set via `:set`. -- | Directives set via `:set`.
evalCommand output (Directive SetDynFlag flags) state = evalCommand output (Directive SetDynFlag flags) state =
case words flags of 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. -- For a single flag.
[flag] -> do [flag] -> do
write $ "DynFlags: " ++ flags write $ "DynFlags: " ++ flags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment