Closed zzantares closed 6 months ago
Can you post a concrete example of the folder structure (.cabal
file plus Haskell source file) which reproduces the problem?
Closing due to lack of activity. @zzantares, feel free to re-open. If you want us to look at this please provide a more complete example @amesgen asked for. For this kind of problem it is important how Cabal file is written and what package component your source file belongs to.
Describe the bug
Formatting a file that uses overloaded labels without declaring the
OverloadedLabels
extension in the file, inserts a space after hash sign after formatting.To Reproduce
Given this file:
Using
ormolu sample.hs
to format it results in (note the extra space in# title
:Expected behavior To behave as if the
OverloadedLabels
was explicitly enabled in the file, thus producing this output:Environment
Ubuntu 22.04.3 LTS
ormolu 0.7.2.0 using ghc-lib-parser 9.6.3.20231014
Additional context This does not occur if the file has
{-# LANGUAGE OverloadedLabels #-}
at the top, but it does when the extension is enabled via the*.cabal
file.