Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ interpreterHandler args f = do
progName <- getProgName
iargs <- getInterpreterArgs path
let parseCmdLine = commandLineHandler progName True
let cmdArgs = stackArgs ++ iargs ++ "--" : path : fileArgs
separator = if "--" `elem` iargs then [] else ["--"]
cmdArgs = stackArgs ++ iargs ++ separator ++ path : fileArgs
-- TODO show the command in verbose mode
-- hPutStrLn stderr $ unwords $
-- ["Running", "[" ++ progName, unwords cmdArgs ++ "]"]
Expand Down Expand Up @@ -745,7 +746,9 @@ 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 "" ("-e" : "Main.main" : args)
(ExecRunGhc, args) ->
let opts = concatMap (\x -> ["-package", x]) eoPackages
in execCompiler "" (opts ++ ("-e" : "Main.main" : args))
let targets = concatMap words eoPackages
unless (null targets) $
Stack.Build.build (const $ return ()) lk defaultBuildOptsCLI
Expand Down