Abstracting documentChangeUri
[lsp-test.git] / src / Language / LSP / Test.hs
index a068b0eda6bb9254e32aa49c4daadcb95716eb86..89abfcf8b7a0c275c2903e9de9c9833c88b61bdf 100644 (file)
@@ -283,13 +283,6 @@ getDocumentEdit doc = do
 
   documentContents doc
   where
-    -- extract Uri out from DocumentChange
-    documentChangeUri :: DocumentChange -> Uri
-    documentChangeUri (InL x) = x ^. textDocument . uri
-    documentChangeUri (InR (InL x)) = x ^. uri
-    documentChangeUri (InR (InR (InL x))) = x ^. oldUri
-    documentChangeUri (InR (InR (InR x))) = x ^. uri
-
     checkDocumentChanges req =
       let changes = req ^. params . edit . documentChanges
           maybeDocs = fmap (fmap documentChangeUri) changes