Skip to content

stack ghci broken(?) on GHC 9.14.1 #6844

@mpilgrem

Description

@mpilgrem

See GHC issue:

With GHC 9.14.1:

> stack ghci
Using main module:
1.  Package testGhc9141, component testGhc9141:exe:testGhc9141-exe, with main-is file:
    D:\Users\mike\Code\Haskell\testGhc9141\app\Main.hs.

testGhc9141> configure (lib + exe)
Configuring testGhc9141-0.1.0.0...
testGhc9141> initial-build-steps (lib + exe)

Warning: The following GHC options are incompatible with GHCi and have not been passed to it: -threaded.

Configuring GHCi with the following packages: testGhc9141.
GHCi, version 9.14.1: https://www.haskell.org/ghc/  :? for help
<interactive>: error: [GHCi-23305]
    Module Lib not found

<no location info>: warning: [GHC-32850] [-Wmissing-home-modules]
    Modules are not listed in options for ‘main’ but needed for compilation:
        Lib

[1 of 3] Compiling Lib              ( D:\Users\mike\Code\Haskell\testGhc9141\src\Lib.hs, interpreted )[main]
[2 of 3] Compiling Main             ( D:\Users\mike\Code\Haskell\testGhc9141\app\Main.hs, interpreted )[interactive-session]
Ok, one module added.
Loaded GHCi configuration from C:\Users\mike\AppData\Local\stack\ghci-script\a658edde\ghci-script
ghci>

The <no location info> warning is a consequence of ghc-options: [-Wmissing-home-modules]. Without that:

GHCi, version 9.14.1: https://www.haskell.org/ghc/  :? for help
<interactive>: error: [GHCi-23305]
    Module Lib not found

[1 of 3] Compiling Lib              ( D:\Users\mike\Code\Haskell\testGhc9141\src\Lib.hs, interpreted )[main]
[2 of 3] Compiling Main             ( D:\Users\mike\Code\Haskell\testGhc9141\app\Main.hs, interpreted )[interactive-session]
Ok, one module added.
Loaded GHCi configuration from C:\Users\mike\AppData\Local\stack\ghci-script\a658edde\ghci-script
ghci> :show modules
Lib              ( D:\Users\mike\Code\Haskell\testGhc9141\src\Lib.hs, interpreted )
Main             ( D:\Users\mike\Code\Haskell\testGhc9141\app\Main.hs, interpreted )
ghci>

Despite the Module Lib not found and Ok, one module added., both modules are compiled and shown as loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions