From e1c7fb438b34d6c36d11e4669239b070b4a13a15 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 21 Jul 2017 15:40:02 -0400 Subject: [PATCH] Rename runTaskOptions to runTaskWithOptions. --- src/Semantic/Task.hs | 10 +++++----- src/SemanticCmdLine.hs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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