Skip to content

--ghc-options only takes a single option #3315

@mgsloan

Description

@mgsloan

From the comment here #758 (comment) :

$ stack ghci --ghc-options="-ddump-simpl -dsuppress-idinfo"
Configuring GHCi with the following packages:
GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
ghc.EXE: unrecognised flag: -ddump-simpl -dsuppress-idinfo

Usage: For basic information, try the `--help' option.

Curiously, the documentation on the argsOption function that handles this mentions --ghc-options, but it isn't currently used:

-- | An option which accepts a list of arguments e.g. @--ghc-options="-X P.hs \"this\""@.
argsOption :: O.Mod O.OptionFields [String] -> O.Parser [String]

Fix is to use this for ghc-options and make sure it's also used for other similar options fields

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions