Skip to content

ghc: Introduce --run mode

Ben Gamari requested to merge wip/run-mode into master

As suggested in #18011, introduce a GHC mode to run a script. This is similar to runghc but can invoked using the same GHC executable used for normal compilation. This is useful, e.g., in the case of Cabal since the user might have provided a path to a GHC executable with a version suffix; identifying the runghc executable that corresponds to this executable would currently require fragile heuristics. One possible use would be to run custom Setup scripts using this mode.

Following typical UNIX convention, arguments to be passed to the script can be separated from GHC arguments using a -- token.

Edited by Ben Gamari

Merge request reports