1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 02:14:20 +03:00

Rename runTaskOptions to runTaskWithOptions.

This commit is contained in:
Rob Rix 2017-07-21 15:40:02 -04:00
parent 7577eec628
commit e1c7fb438b
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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