diff --git a/src/Semantic/Task.hs b/src/Semantic/Task.hs index a8754e268..5e2b1bb24 100644 --- a/src/Semantic/Task.hs +++ b/src/Semantic/Task.hs @@ -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) diff --git a/src/SemanticCmdLine.hs b/src/SemanticCmdLine.hs index ea171f591..d73c5a0ae 100644 --- a/src/SemanticCmdLine.hs +++ b/src/SemanticCmdLine.hs @@ -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