File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
plugins/hls-cabal-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ import qualified Language.LSP.Types as LSP
4040import qualified Language.LSP.VFS as VFS
4141
4242data Log
43- = LogModificationTime NormalizedFilePath ( Maybe FileVersion )
43+ = LogModificationTime NormalizedFilePath FileVersion
4444 | LogShake Shake. Log
4545 | LogDocOpened Uri
4646 | LogDocModified Uri
@@ -138,11 +138,10 @@ cabalRules recorder = do
138138 define (cmapWithPrio LogShake recorder) $ \ ParseCabal file -> do
139139 -- whenever this key is marked as dirty (e.g., when a user writes stuff to it),
140140 -- we rerun this rule because this rule *depends* on GetModificationTime.
141- t <- use GetModificationTime file
141+ (t, mCabalSource) <- use_ GetFileContents file
142142 log' Debug $ LogModificationTime file t
143- mVirtualFile <- Shake. getVirtualFile file
144- contents <- case mVirtualFile of
145- Just vfile -> pure $ Encoding. encodeUtf8 $ VFS. virtualFileText vfile
143+ contents <- case mCabalSource of
144+ Just sources -> pure $ Encoding. encodeUtf8 sources
146145 Nothing -> do
147146 liftIO $ BS. readFile $ fromNormalizedFilePath file
148147
You can’t perform that action at this time.
0 commit comments