File tree 1 file changed +6
-1
lines changed
src/Haskell/Ide/Engine/Plugin
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -213,8 +213,13 @@ makeRefactorResult changedFiles = do
213
213
diffOne (fp, newText) = do
214
214
uri <- canonicalizeUri $ filePathToUri fp
215
215
mvf <- getVirtualFile uri
216
+ let resultFail = return $ IdeResultFail
217
+ (IdeError PluginError
218
+ (T. pack " makeRefactorResult: no access to the persisted file." )
219
+ Null
220
+ )
216
221
origText <- case mvf of
217
- Nothing -> withMappedFile fp undefined $ liftIO . T. readFile
222
+ Nothing -> withMappedFile fp resultFail $ liftIO . T. readFile
218
223
Just vf -> pure (Rope. toText $ _text vf)
219
224
-- TODO: remove this logging once we are sure we have a working solution
220
225
logm $ " makeRefactorResult:groupedDiff = " ++ show (getGroupedDiff (lines $ T. unpack origText) (lines $ T. unpack newText))
You can’t perform that action at this time.
0 commit comments