This is the commit in question: cute-c2 ..doesnt compile due to duplicate record fields in re-export · ramirez7/theveryseriousjuniperdevgamejam2026@58c3539 · GitHub
I’m using the wasm backend toolchain (ghc 9.14.1.20260330 + cabal 3.14.2.0)
I thought I could specify ghc-options for my dependencies this way, but apparently not? It still fails to compile as if that extension isn’t enabled.
This isn’t a huge blocker (I can just commit a fix for the error) but I was surprised.
My library (cute-c2) is failing to compile because it re-exports some record fields that are duplicates but doesn’t declare {-# LANGUAGE DuplicateRecordFields #-} [1]
[1] The defining module does though..is this error new for re-exports?
IIRC there shouldn’t be a colon in the first line, maybe that is the issue? That is, it should be package cute-c2 instead of package: cute-c2. It is weird that it is not a parse error if that is indeed the issue though.
Oh I bet that is it! Agreed it’s weird I didn’t get an error..
Just chiming in to say that you didn’t get an error because Cabal allows you to have “swung” indentation on fields, like this:
description: Hello,
world!
You can use Gild (my tool) to format Cabal files, which would’ve made this a little more obvious:
$ curl --silent https://raw.githubusercontent.com/ramirez7/theveryseriousjuniperdevgamejam2026/58c35390ea3e4abe4f7e95a39bd21a5e430a43fc/cabal.project |
cabal run cabal-gild |
tail --lines 3
package:
cute-c2
ghc-options: -XDuplicateRecordFields
Can gild be set up as an hls plugin?
I don’t use HLS, but I think Gild is already available as a plugin: Features — haskell-language-server 2.14.0.0 documentation
The PR @mixphix posted is for formatting HLS’s Cabal files with Gild.
Whoops! On mobile right now, my apologies.