Skip to content

Conversation

@georgefst
Copy link
Collaborator

@georgefst georgefst commented Sep 15, 2022

HLS 1.8 finally picks up Fourmolu > 0.7. In fact it ships with 0.8 on all GHC versions.

Unfortunately this causes a regression in recognising operator fixities for packages whose fixities were previously hardcoded. At least in environments with no Cabal file. I hit this with SBV, within seconds of installing the new HLS version.

This current implementation feels like a total hack. I could do with suggestions.

TODO

  • get fixities from env directly, rather than even having to read cabal file? this may be the key to doing this robustly
  • implement this for Ormolu
  • wrap version CPP around cfgDependencies, putting it in Shim.hs
  • check compatiblity across GHC API versions - given this involves units, I'd expect the API used to have changed in 9.4
  • regression test
  • maybe combine noCabal and packages in to a single option, seeing as they're closely related and introduced in the same version of Fourmolu

This helps it to determine fixity information, particularly in the absence of a Cabal file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants