Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 1.08 KB

runghc_command.md

File metadata and controls

22 lines (18 loc) · 1.08 KB

The stack runghc and stack runhaskell commands

stack runghc [-- ARGUMENT(S) (e.g. stack runghc -- X.hs)]
             [--[no-]ghc-package-path] [--[no-]stack-exe] [--package PACKAGE]
             [--rts-options RTSFLAG] [--cwd DIR]

stack runhaskell has the same effect as stack runghc. stack runghc has the same effect as, and is provided as a shorthand for, stack exec runghc, with the exception of the --package option.

Pass the option --package <package(s)> to add the initial GHC argument -package-id=<unit_id>, where <unit_id> is the unit ID of the specified package in the installed package database. The option can be a list of package names or package identifiers separated by spaces. The option can also be specified multiple times. The approach taken to these packages is the same as if they were specified as targets to stack build.