Open
Description
Describe the bug
So the default behavior of treefmt, is to to not pass the file path to the downstream formatter if formatting via stdin. But that subtly breaks fourmolu, it fails to pull in the active Haskell extensions. So fourmolu -i -c fat-hs/src/MyLib.hs < fat-hs/src/MyLib.hs
works, but fourmolu -i -c < fat-hs/src/MyLib.hs
doesn't. I don't quite see from the code, where does the path get omitted,
Line 80 in 9399cd6
To Reproduce
- clone my thesis repo https://git.redalder.org/magic_rb/bsc-thesis
- try to format
fat-hs/src/MyLib.hs
usingtreefmt
, so:treefmt --stdin fat-hs/src/MyLib.hs < fat-hs/src/MyLib.hs
Expected behavior
Formatting is consistent between stdin
mode and direct mode
System information
NixOS 25.05, exact versions of everything are pinned in https://git.redalder.org/magic_rb/bsc-thesis
Additional context