File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ module Development.IDE.Core.Rules(
23
23
getDependencies ,
24
24
getParsedModule ,
25
25
fileFromParsedModule ,
26
+ generateCore ,
26
27
) where
27
28
28
29
import Control.Monad
@@ -279,15 +280,17 @@ typeCheckRule =
279
280
IdeOptions { optDefer = defer} <- getIdeOptions
280
281
liftIO $ typecheckModule defer packageState tms pm
281
282
283
+ generateCore :: NormalizedFilePath -> Action ([FileDiagnostic ], Maybe CoreModule )
284
+ generateCore file = do
285
+ deps <- use_ GetDependencies file
286
+ (tm: tms) <- uses_ TypeCheck (file: transitiveModuleDeps deps)
287
+ setPriority priorityGenerateCore
288
+ packageState <- hscEnv <$> use_ GhcSession file
289
+ liftIO $ compileModule packageState tms tm
282
290
283
291
generateCoreRule :: Rules ()
284
292
generateCoreRule =
285
- define $ \ GenerateCore file -> do
286
- deps <- use_ GetDependencies file
287
- (tm: tms) <- uses_ TypeCheck (file: transitiveModuleDeps deps)
288
- setPriority priorityGenerateCore
289
- packageState <- hscEnv <$> use_ GhcSession file
290
- liftIO $ compileModule packageState tms tm
293
+ define $ \ GenerateCore -> generateCore
291
294
292
295
293
296
-- A local rule type to get caching. We want to use newCache, but it has
You can’t perform that action at this time.
0 commit comments