Fix the slow checking issue in interactive mode
This commit is contained in:
parent
0b144ef0b2
commit
50917f8cbe
@ -462,7 +462,6 @@ loadTargets opts targetStrs = do
|
|||||||
let interp = needsHscInterpreted mg
|
let interp = needsHscInterpreted mg
|
||||||
target <- hscTarget <$> getSessionDynFlags
|
target <- hscTarget <$> getSessionDynFlags
|
||||||
when (interp && target /= HscInterpreted) $ do
|
when (interp && target /= HscInterpreted) $ do
|
||||||
resetTargets targets
|
|
||||||
_ <- setSessionDynFlags . setHscInterpreted =<< getSessionDynFlags
|
_ <- setSessionDynFlags . setHscInterpreted =<< getSessionDynFlags
|
||||||
gmLog GmInfo "loadTargets" $ text "Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms."
|
gmLog GmInfo "loadTargets" $ text "Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms."
|
||||||
|
|
||||||
@ -488,11 +487,6 @@ loadTargets opts targetStrs = do
|
|||||||
return $ Target tid taoc src
|
return $ Target tid taoc src
|
||||||
relativize tgt = return tgt
|
relativize tgt = return tgt
|
||||||
|
|
||||||
resetTargets targets' = do
|
|
||||||
setTargets []
|
|
||||||
void $ load LoadAllTargets
|
|
||||||
setTargets targets'
|
|
||||||
|
|
||||||
showTargetId (Target (TargetModule s) _ _) = moduleNameString s
|
showTargetId (Target (TargetModule s) _ _) = moduleNameString s
|
||||||
showTargetId (Target (TargetFile s _) _ _) = s
|
showTargetId (Target (TargetFile s _) _ _) = s
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user