!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

691 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure138 Servers

Load older messages


SenderMessageTime
23 Jan 2026
@lordmzte:mzte.deLordMZTE

I'm using shellFor for a devshell for my Haskell project and I want to debug a library I'm pulling in (via cabal2nix). For this, GHCi needs to run the library in interpreted mode, but using cabal repl, it's used in compiled mode and I cannot set breakpoints in it. Is there a way to also get the source code of libraries in a dev shell?

13:50:03
@maralorn:maralorn.demaralornThe best I can think of is checking that library out in a (sub-)folder and adapting your cabal.project file to use it.13:57:19
@maralorn:maralorn.demaralornI mean I guess you can try to get nix to give you a store path of the source and try to point your cabal.project file at that, but I don’t know if it works, am not aware of any tooling specific for this und wouldn’t recommend it.13:58:44
@lordmzte:mzte.deLordMZTE

Alright. Sort of unfortunate :P

14:38:10
@alexfmpe:matrix.orgalexfmpeI think that if you add both your package and that library to the packages field of shellFor, then when you run cabal repl, it will grab all the intermediate deps and throw into ghci as well. Might need to enable multi-repl16:19:31
@alexfmpe:matrix.orgalexfmpeWell actually I'm not sure if shellFor handles the sandwhich situation right16:20:41
@alexfmpe:matrix.orgalexfmpeIf it doesn't, I expect it can be fixed. I've some shitty nix that does that for obelisk projects16:21:14
@alexfmpe:matrix.orgalexfmpeContext: https://www.well-typed.com/blog/2024/07/hls-multi/#the-need-for-cabal-install-3.1216:21:51
@acidbong:envs.netAcid Bongnote that cabal-install must also be in the same Haskell closure to be able to see other libs16:52:46

There are no newer messages yet.


Back to Room ListRoom Version: 6