mirror of
https://github.com/github/semantic.git
synced 2025-01-02 12:23:08 +03:00
🔥 runTaskF.
This commit is contained in:
parent
b5177fc94e
commit
6ebfb5c9ac
@ -70,7 +70,7 @@ repl proxy parser paths =
|
||||
. Files.runFiles
|
||||
. runResolution
|
||||
. runParse
|
||||
. runTaskF $ do
|
||||
. runTaskC $ do
|
||||
blobs <- catMaybes <$> traverse readBlobFromFile (flip File (Language.reflect proxy) <$> paths)
|
||||
package <- fmap (fmap quieterm) <$> parsePackage parser (Project (takeDirectory (maybe "/" fst (uncons paths))) blobs (Language.reflect proxy) [])
|
||||
modules <- topologicalSort <$> runImportGraphToModules proxy (snd <$> package)
|
||||
|
@ -45,7 +45,7 @@ module Semantic.Task
|
||||
, withOptions
|
||||
, TaskSession(..)
|
||||
, runTraceInTelemetry
|
||||
, runTaskF
|
||||
, runTaskC
|
||||
-- * Exceptions
|
||||
, ParserCancelled(..)
|
||||
-- * Re-exports
|
||||
@ -155,7 +155,7 @@ runTask taskSession@TaskSession{..} task = do
|
||||
. Files.runFiles
|
||||
. runResolution
|
||||
. runParse
|
||||
. runTaskF
|
||||
. runTaskC
|
||||
run task
|
||||
queueStat statter stat
|
||||
pure result
|
||||
@ -224,9 +224,6 @@ instance HFunctor Task where
|
||||
instance Effect Task where
|
||||
handle state handler (Semantic.Task.Diff terms k) = Semantic.Task.Diff terms (handler . (<$ state) . k)
|
||||
|
||||
-- | Run a 'Task' effect by performing the actions in 'IO'.
|
||||
runTaskF :: TaskC m a -> m a
|
||||
runTaskF = runTaskC
|
||||
|
||||
newtype TaskC m a = TaskC { runTaskC :: m a }
|
||||
deriving (Applicative, Functor, Monad, MonadIO)
|
||||
|
Loading…
Reference in New Issue
Block a user