@@ -90,15 +90,15 @@ spec = do
90
90
doc <- openDoc " BrittanyLF.hs" " haskell"
91
91
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " brittany" ))
92
92
let opts = DocumentFormattingParams doc (FormattingOptions 4 True ) Nothing
93
- ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts
93
+ ResponseMessage _ _ (Right ( Just edits)) <- request TextDocumentFormatting opts
94
94
liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0 ) (Position 5 0 ))
95
95
" module BrittanyLF where\n\n foo :: Int -> String -> IO ()\n foo x y = do\n print x\n return ()\n " ]
96
96
97
97
it " formats a document with CRLF endings" $ runSession hieCommand fullCaps " test/testdata" $ do
98
98
doc <- openDoc " BrittanyCRLF.hs" " haskell"
99
99
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " brittany" ))
100
100
let opts = DocumentFormattingParams doc (FormattingOptions 4 True ) Nothing
101
- ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts
101
+ ResponseMessage _ _ (Right ( Just edits)) <- request TextDocumentFormatting opts
102
102
liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0 ) (Position 5 0 ))
103
103
" module BrittanyCRLF where\n\n foo :: Int -> String -> IO ()\n foo x y = do\n print x\n return ()\n " ]
104
104
@@ -107,7 +107,7 @@ spec = do
107
107
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " brittany" ))
108
108
let range = Range (Position 3 0 ) (Position 5 22 )
109
109
opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True ) Nothing
110
- ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts
110
+ ResponseMessage _ _ (Right ( Just edits)) <- request TextDocumentRangeFormatting opts
111
111
liftIO $ edits `shouldBe` [TextEdit (Range (Position 3 0 ) (Position 6 0 ))
112
112
" foo x y = do\n print x\n return ()\n " ]
113
113
@@ -116,7 +116,7 @@ spec = do
116
116
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " brittany" ))
117
117
let range = Range (Position 3 0 ) (Position 5 22 )
118
118
opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True ) Nothing
119
- ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts
119
+ ResponseMessage _ _ (Right ( Just edits)) <- request TextDocumentRangeFormatting opts
120
120
liftIO $ edits `shouldBe` [TextEdit (Range (Position 3 0 ) (Position 6 0 ))
121
121
" foo x y = do\n print x\n return ()\n " ]
122
122
0 commit comments