mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
Rename runTaskOptions to runTaskWithOptions.
This commit is contained in:
parent
7577eec628
commit
e1c7fb438b
@ -19,7 +19,7 @@ module Semantic.Task
|
||||
, defaultOptions
|
||||
, configureOptionsForHandle
|
||||
, runTask
|
||||
, runTaskOptions
|
||||
, runTaskWithOptions
|
||||
) where
|
||||
|
||||
import Control.Concurrent.STM.TMQueue
|
||||
@ -152,13 +152,13 @@ configureOptionsForHandle handle options = do
|
||||
|
||||
-- | Execute a 'Task' with the 'defaultOptions', yielding its result value in 'IO'.
|
||||
--
|
||||
-- > runTask = runTaskOptions defaultOptions
|
||||
-- > runTask = runTaskWithOptions defaultOptions
|
||||
runTask :: Task a -> IO a
|
||||
runTask = runTaskOptions defaultOptions
|
||||
runTask = runTaskWithOptions defaultOptions
|
||||
|
||||
-- | Execute a 'Task' with the passed 'Options', yielding its result value in 'IO'.
|
||||
runTaskOptions :: Options -> Task a -> IO a
|
||||
runTaskOptions options task = do
|
||||
runTaskWithOptions :: Options -> Task a -> IO a
|
||||
runTaskWithOptions options task = do
|
||||
options <- configureOptionsForHandle stderr options
|
||||
logQueue <- newTMQueueIO
|
||||
logging <- async (sink logQueue)
|
||||
|
@ -21,7 +21,7 @@ import System.IO (stdin)
|
||||
import qualified Semantic (parseBlobs, diffBlobPairs)
|
||||
|
||||
main :: IO ()
|
||||
main = customExecParser (prefs showHelpOnEmpty) arguments >>= uncurry Task.runTaskOptions
|
||||
main = customExecParser (prefs showHelpOnEmpty) arguments >>= uncurry Task.runTaskWithOptions
|
||||
|
||||
runDiff :: SomeRenderer DiffRenderer -> Either Handle [Both (FilePath, Maybe Language)] -> Task.Task ByteString
|
||||
runDiff (SomeRenderer diffRenderer) = Semantic.diffBlobPairs diffRenderer <=< Task.readBlobPairs
|
||||
|
Loading…
Reference in New Issue
Block a user