Closed
Description
I am finding that vscode-hie-server is formatting my code differently than when I invoke brittany
locally.
Here's me invoking it locally:
$ brittany --version
brittany version 0.12.1.1
[snip]
$ brittany test.hs
f :: [String] -> Int
f (nm : cats : edges) =
let edges' =
map ((\[a, b] -> (a, [b])) . (map read . words)) edges :: [(Int, [Int])]
in 0
In contrast, when I format from the command palette, I get something way worse:
f :: [String] -> Int
f (nm : cats : edges) =
let edges' =
map ((\[a, b] -> (a, [b])) . (map read . words)) edges :: [ ( Int
, [Int]
)
]
in 0
I am not sure what's going wrong here. Is vscode-hie-server invoking a rogue version of brittany on my machine? Could be. I tried all of the brittany binaries in ~/.stack
and they had the first formatting, find ~/.stack -name brittany | xargs -n1 -I{} sh -c '{} test.hs'
.