@@ -14,9 +14,7 @@ module Development.IDE.Core.FileStore(
1414 makeLSPVFSHandle
1515 ) where
1616
17−import StringBuffer
1817import Development.IDE.GHC.Orphans()
19−import Development.IDE.GHC.Util
2018import Development.IDE.Core.Shake
2119import Control.Concurrent.Extra
2220import qualified Data.Map.Strict as Map
@@ -85,7 +83,7 @@ makeLSPVFSHandle lspFuncs = VFSHandle
8583
8684
8785-- | Get the contents of a file, either dirty (if the buffer is modified) or Nothing to mean use from disk.
88−type instance RuleResult GetFileContents = (FileVersion, Maybe StringBuffer)
86+type instance RuleResult GetFileContents = (FileVersion, Maybe T.Text)
8987
9088data GetFileContents = GetFileContents
9189 deriving (Eq, Show, Generic)
@@ -143,7 +141,7 @@ getFileContentsRule vfs =
143141 time <- use_ GetModificationTime file
144142 res <- liftIO $ ideTryIOException file $ do
145143 mbVirtual <- getVirtualFile vfs $ filePathToUri' file
146− pure $ textToStringBuffer . Rope.toText . _text <$> mbVirtual
144+ pure $ Rope.toText . _text <$> mbVirtual
147145 case res of
148146 Left err -> return ([err], Nothing)
149147 Right contents -> return ([], Just (time, contents))
@@ -155,7 +153,7 @@ ideTryIOException fp act =
155153 <$> try act
156154
157155
158−getFileContents :: NormalizedFilePath -> Action (FileVersion, Maybe StringBuffer)
156+getFileContents :: NormalizedFilePath -> Action (FileVersion, Maybe T.Text)
159157getFileContents = use_ GetFileContents
160158
161159fileStoreRules :: VFSHandle -> Rules ()