Skip to content

Commit

Permalink
Merge pull request #2474 from commercialhaskell/avoid-runghc
Browse files Browse the repository at this point in the history
Replace runghc with ghc -e Main.main
  • Loading branch information
mgsloan authored Aug 12, 2016
2 parents a48ea6c + 195bfbf commit 90103f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ execCmd ExecOpts {..} go@GlobalOpts{..} =
(cmd, args) <- case (eoCmd, eoArgs) of
(ExecCmd cmd, args) -> return (cmd, args)
(ExecGhc, args) -> return ("ghc", args)
(ExecRunGhc, args) -> return ("runghc", args)
(ExecRunGhc, args) -> return ("ghc", "-e" : "Main.main" : args)
(manager,lc) <- liftIO $ loadConfigWithOpts go
withUserFileLock go (configStackRoot $ lcConfig lc) $ \lk -> do
compilerVersion <- loadCompilerVersion manager go lc
Expand All @@ -742,7 +742,7 @@ execCmd ExecOpts {..} go@GlobalOpts{..} =
(ExecGhc, args) -> execCompiler "" args
-- NOTE: this won't currently work for GHCJS, because it doesn't have
-- a runghcjs binary. It probably will someday, though.
(ExecRunGhc, args) -> execCompiler "run" args
(ExecRunGhc, args) -> execCompiler "" ("-e" : "Main.main" : args)
let targets = concatMap words eoPackages
unless (null targets) $
Stack.Build.build (const $ return ()) lk defaultBuildOptsCLI
Expand Down

0 comments on commit 90103f6

Please sign in to comment.