packages feed

haskell-lsp-types 0.18.0.0 → 0.19.0.0

raw patch · 3 files changed

+18/−7 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,12 @@ # Revision history for haskell-lsp-types +## 0.19.0.0 -- 2019-12-14++* Fix vfs line endings (@jneira)+* Fix typo in .cabal (@turion)+* Normalize file paths before converting to Uri's (@jneira)+* Fixes to persistVirtualFile (@mpickering)+ ## 0.18.0.0 -- 2019-11-17  * Fix response type for CodeLensResolve, add the ContentModified error
haskell-lsp-types.cabal view
@@ -1,5 +1,5 @@ name:                haskell-lsp-types-version:             0.18.0.0+version:             0.19.0.0 synopsis:            Haskell library for the Microsoft Language Server Protocol, data types  description:         An implementation of the types to allow language implementors to
src/Language/Haskell/LSP/Types/Uri.hs view
@@ -26,8 +26,10 @@   deriving (Eq,Ord,Read,Show,Generic,Hashable)  toNormalizedUri :: Uri -> NormalizedUri-toNormalizedUri (Uri t) =+toNormalizedUri uri =     NormalizedUri $ T.pack $ escapeURIString isUnescapedInURI $ unEscapeString $ T.unpack t+  where (Uri t) = maybe uri filePathToUri (uriToFilePath uri)+        -- To ensure all `Uri`s have the file path like the created ones by `filePathToUri`  fromNormalizedUri :: NormalizedUri -> Uri fromNormalizedUri (NormalizedUri t) = Uri t@@ -82,11 +84,13 @@   | systemOS == windowsOS = '/' : escapedPath   | otherwise = escapedPath   where-    (splitDirectories, splitDrive)-      | systemOS == windowsOS = (FPW.splitDirectories, FPW.splitDrive)-      | otherwise = (FPP.splitDirectories, FPP.splitDrive)+    (splitDirectories, splitDrive, normalise)+      | systemOS == windowsOS =+          (FPW.splitDirectories, FPW.splitDrive, FPW.normalise)+      | otherwise =+          (FPP.splitDirectories, FPP.splitDrive, FPP.normalise)     escapedPath =-        case splitDrive srcPath of+        case splitDrive (normalise srcPath) of             (drv, rest) ->                 convertDrive drv `FPP.joinDrive`                 FPP.joinPath (map (escapeURIString unescaped) $ splitDirectories rest)@@ -94,7 +98,7 @@     -- we do a final replacement of \ to /     convertDrive drv       | systemOS == windowsOS && FPW.hasTrailingPathSeparator drv =-        FPP.addTrailingPathSeparator (init drv)+          FPP.addTrailingPathSeparator (init drv)       | otherwise = drv     unescaped c       | systemOS == windowsOS = isUnreserved c || c `elem` [':', '\\', '/']