Haskell in Nixpkgs/NixOS | 720 Members | |
| For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | 142 Servers |
| Sender | Message | Time |
|---|---|---|
| 30 Nov 2025 | ||
Ok, thanks, this is helpful. I didn’t realize the cabal-version couldn’t be an arbitrary Cabal version. I also didn’t realize you could use custom-setup with build-type: Simple (the manual explicitly says “A custom-setup stanza is required for Custom and Hooks build-type, and will be ignored (with a warning) for other build types.” – but it’s not ignored, thankfully), so I was thinking the cabal-version would be the only way inform users that they need to build with a particular Cabal version. | 02:03:48 | |
What I’m trying to do is put ghc-options: -fplugin=NoRecursion in a Cabal file, but that’s broken in the Cabal versions bundled with GHC 9.6.1–9.8.2. | 02:09:07 | |
| 1 Dec 2025 | ||
| Is it possible to downgrade my Haskell-Language-Server version for testing purposes? I'm using this
| 00:16:58 | |
| It's pulling from unstable, as that's the only version of nixpkgs I have on my NixOS system. | 00:17:23 | |
| Basically, something weird is happening in my Emacs with font coloring, and I want to see if it's an LSP issue or not. https://github.com/haskell/haskell-mode/issues/1884 | 00:18:20 | |
| * It's pulling from unstable (giving me 2.12.0.0), as that's the only version of nixpkgs I have on my NixOS system. | 00:20:17 | |
| iqubic (she/her)do you use eglot? Which version? | 00:23:31 | |
| I'm using LSP mode. Not Elgot. | 00:24:10 | |
As the GitHub issue notes, Day01 and Common.* at the top are being rendered with haskell-constructor-face | 00:25:17 | |
| The easiest way to downgrade hls is to switch to an old nixpkgs commit whose hls is old, I guess | 00:25:44 | |
| I see. | 00:25:55 | |
The issue is that I don't think these symbols should be colored with the haskell-constructor-face, because those are constructors. They are module names. | 00:27:36 | |
In reply to @mequbic:matrix.org I don't know much about how HLS is implemented, but it seems like you may be able to disable the semantic highlighting by removing the plugin that implements it (see https://github.com/haskell/haskell-language-server/pull/3892) from your HLS installation. I assume there is a way of overriding the list of installed HLS plugins in Nixpkgs. If that resolves your issue, then it's in some way caused by the semantic highlighting. If the issue persists, I find it highly doubtful that HLS is responsible. | 01:03:14 | |
| Yeah... if there's a way to disable that to test things out, I'd love to. | 01:03:56 | |
In reply to @mequbic:matrix.orgTry adding haskell.plugin.semanticTokens.globalOn: false to your HLS config.(See https://haskell-language-server.readthedocs.io/en/latest/configuration.html#generic-plugin-configuration, the plugin isn't listed in the docs but I found its config option in the PR.) | 01:09:59 | |
| Where is the default HLS config? | 01:10:19 | |
| No idea. I think that would depend on your editor or how you're starting the LSP server, so you should probably consult the relevant section of your editor's manual (since most editors start the server themselves). | 01:12:29 | |
| Btw it seems to be default disabled on most GHC versions. | 01:13:43 | |
| I'm using Emacs LSP-Mode. | 01:14:09 | |
| https://emacs-lsp.github.io/lsp-mode/ | 01:14:22 | |
| Not familiar with Emacs, sorry. You could perhaps also try checking for changes in the syntax highlighting (or in the treesitter highlighter, if the editor uses that). | 01:16:36 | |
| I'm not using treesitter. In fact, I explicitly just turned that off recently. | 01:17:10 | |
| moin for defining variables that aren't supposed to be exported (like in single-file programs), what's more idiomatic/common in haskell: multiple top-level assignments before the main function or let..in block(s)? | 06:08:05 | |
| Probably not the right room to be asking (sorry), and I'm not sure there is an option that's more idiomatic. But I'll give my own recommendations and heuristics:
| 07:46:35 | |
In reply to @b:chreekat.netoh damn, i confused the room | 09:06:53 | |
| 09:08:17 | ||
| 2 Dec 2025 | ||
| Well... the Haskell LSP is throwing errors for me on NixOS. I have it installed via my nix-shell:
| 06:04:21 | |
| That's pulling in GHC 9.10.3 | 06:04:51 | |
After doing some work on a Haskell program of mine, I got this message dumped into stderr:https://dpaste.alwaysdata.org/2T0oxtWG | 06:05:52 | |
* That's pulling in GHC 9.10.3 from nixpkg-unstable | 06:06:20 | |