Skip to content

Commit

Permalink
Allow exec and ghci commands in interpreter mode
Browse files Browse the repository at this point in the history
fixes #2510
  • Loading branch information
harendra-kumar committed Aug 18, 2016
1 parent 03da292 commit d5b8c6e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -313,22 +313,10 @@ commandLineHandler progName isInterpreter = complicatedOptions
"Visualize your project's dependency graph using Graphviz dot"
dotCmd
dotOptsParser
addCommand' "exec"
"Execute a command"
execCmd
(execOptsParser Nothing)
addCommand' "ghc"
"Run ghc"
execCmd
(execOptsParser $ Just ExecGhc)
addCommand' "ghci"
"Run ghci in the context of package(s) (experimental)"
ghciCmd
ghciOptsParser
addCommand' "repl"
"Run ghci in the context of package(s) (experimental) (alias for 'ghci')"
ghciCmd
ghciOptsParser
addCommand' "hoogle"
"Run hoogle in the context of the current Stack config"
hoogleCmd
Expand All @@ -343,7 +331,19 @@ commandLineHandler progName isInterpreter = complicatedOptions
help "Rebuild the hoogle database"))
)

-- These two are the only commands allowed in interpreter mode as well
-- These are the only commands allowed in interpreter mode as well
addCommand' "exec"
"Execute a command"
execCmd
(execOptsParser Nothing)
addCommand' "ghci"
"Run ghci in the context of package(s) (experimental)"
ghciCmd
ghciOptsParser
addCommand' "repl"
"Run ghci in the context of package(s) (experimental) (alias for 'ghci')"
ghciCmd
ghciOptsParser
addCommand' "runghc"
"Run runghc"
execCmd
Expand Down

0 comments on commit d5b8c6e

Please sign in to comment.