Closed sharno closed 6 years ago
I'm using brittany through the Haskell Language Server plugin in VSCode and I was trying to format this code
module Jammin where data Fruit = Peach | Plum | Apple | Blackberry deriving (Eq, Show, Ord) data JamJars = Jam {fruit::Fruit, num::Int} deriving (Eq, Show, Ord) row1, row2, row3, row4, row5, row6 :: JamJars row1 = Jam Plum 1 row2 = Jam Blackberry 9 row3 = Jam Apple 12 row4 = Jam Blackberry 10 row5 = Jam Peach 32 row6 = Jam Apple 4 allJam :: [JamJars] allJam = [row1, row2, row3, row4, row5, row6]
it gives me this error in the output of the plugin:
[Error - 10:42:55 AM] Request textDocument/formatting failed. Message: IdeError {ideCode = PluginError, ideMessage = "brittanyCmd: Brittany error - invalid output\n", ideInfo = Null} Code: -32603
Removing the indentation of all the code after where makes it work again although the it was valid code with indentation
where
Closing as duplicate of #81 (whose title i just clarified a bit).
Thanks for the report. This is indeed a case that simply is not handled correctly yet and that should be fixed.
I'm using brittany through the Haskell Language Server plugin in VSCode and I was trying to format this code
it gives me this error in the output of the plugin:
Removing the indentation of all the code after
where
makes it work again although the it was valid code with indentation