@@ -599,7 +599,7 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
599
599
this_target_details = TargetDetails (TargetFile _cfp) this_error_env this_dep_info [_cfp]
600
600
this_flags = (this_error_env, this_dep_info)
601
601
this_error_env = ([this_error], Nothing )
602
- this_error = uncurry ( FileDiagnostic _cfp) $ ideErrorWithSource (Just " cradle" ) (Just DiagnosticSeverity_Error )
602
+ this_error = ideErrorWithSource (Just " cradle" ) (Just DiagnosticSeverity_Error ) _cfp
603
603
$ T. unlines
604
604
[ " No cradle target found. Is this file listed in the targets of your cradle?"
605
605
, " If you are using a .cabal file, please ensure that this module is listed in either the exposed-modules or other-modules section"
@@ -923,7 +923,7 @@ newComponentCache recorder exts cradlePath _cfp hsc_env old_cis new_cis dir = do
923
923
924
924
#if MIN_VERSION_ghc(9,3,0)
925
925
let closure_errs = checkHomeUnitsClosed' (hsc_unit_env hscEnv') (hsc_all_home_unit_ids hscEnv')
926
- multi_errs = map (uncurry ( FileDiagnostic _cfp) . ideErrorWithSource (Just " cradle" ) (Just DiagnosticSeverity_Warning ) . T. pack . Compat. printWithoutUniques) closure_errs
926
+ multi_errs = map (ideErrorWithSource (Just " cradle" ) (Just DiagnosticSeverity_Warning ) _cfp . T. pack . Compat. printWithoutUniques) closure_errs
927
927
bad_units = OS. fromList $ concat $ do
928
928
x <- bagToList $ mapBag errMsgDiagnostic $ unionManyBags $ map Compat. getMessages closure_errs
929
929
DriverHomePackagesNotClosed us <- pure x
@@ -1311,6 +1311,4 @@ showPackageSetupException PackageSetupException{..} = unwords
1311
1311
1312
1312
renderPackageSetupException :: FilePath -> PackageSetupException -> FileDiagnostic
1313
1313
renderPackageSetupException fp e =
1314
- let (showDiag, lspDiag) = ideErrorWithSource (Just " cradle" ) (Just DiagnosticSeverity_Error ) (T. pack $ showPackageSetupException e)
1315
- in
1316
- FileDiagnostic (toNormalizedFilePath' fp) showDiag lspDiag
1314
+ ideErrorWithSource (Just " cradle" ) (Just DiagnosticSeverity_Error ) (toNormalizedFilePath' fp) (T. pack $ showPackageSetupException e)
0 commit comments