Skip to content

Ghc shell env remains fixed even after changing cabal file #2359

Closed
@nrs-status

Description

@nrs-status
  • Build system: x86_64-linux
  • GHC version: tested 9.6.6, 9.8.4, 9.10.1
  • Haskell.nix rev : d4fd889 (as shown in flake.lock in repo below)
  • Description: ghc-pkg list does not show template-haskell after modifying .cabal file to add it and restarting env, causing cabal commands to fail to solve for the template-haskell constraint.

To reproduce:

  1. Clone and cd to repo https://github.com/nrs-status/haskellnixIssue/tree/main
  2. Modify cabal file to have build-depends contain only base, template-haskell
  3. nix develop and then ghc-pkg list

Since cabal doesn't work (because it can't solve for the template-haskell package that is not in ghc-pkg list), this causes the lsp to not work as well. This wouldn't be an issue if it wasn't for the lsp, because the nix run and nix build commands work properly and seem to solve the constraint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions