Skip to content

stack ghci usability #1517

@alexanderkjeldaas

Description

@alexanderkjeldaas

stack ghci should not leave a user with no "next step" when trying to invoke ghci when the build is broken.

In this example, stack refuses to start ghci because it cannot satisfy -package new-template. That might not be the most important aspect of starting ghci for the user, and there seems to be no way out of this, at least not as documented in --help.

$ stack ghci
Configuring GHCi with the following packages: new-template
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
<command line>: cannot satisfy -package new-template
    (use -v for more information)
$ stack ghci --help
Usage: stack ghci [TARGET] [--ghc-options OPTION] [--with-ghc GHC] [--no-load]
  Run ghci in the context of project(s)

Available options:
  TARGET                   If none specified, use all packages defined in
                           current directory
  --ghc-options OPTION     Additional options passed to GHCi
  --with-ghc GHC           Use this command for the GHC to run
  --no-load                Don't load modules on start-up
$ stack ghci --no-load
Configuring GHCi with the following packages: new-template
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
<command line>: cannot satisfy -package new-template
    (use -v for more information)
$ ghci
GHCi, version 7.10.1: http://www.haskell.org/ghc/  :? for help
Prelude>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions