Skip to content

Commit

Permalink
Rename 'cc' to 'stepDefinitions'.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielprioli committed Dec 6, 2012
1 parent 71ae070 commit 70e9914
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Test/Chuchu.hs
Expand Up @@ -119,14 +119,14 @@ import Test.Chuchu.Parser
-- @.feature@ file as parameters on the command line. If you want to
-- use it inside a library, consider using 'withArgs'.
chuchuMain :: (MonadIO m, Applicative m) => Chuchu m -> (m () -> IO ()) -> IO ()
chuchuMain cc runMIO = do
chuchuMain stepDefinitions runMIO = do
listOfPaths <- getPaths
parsedFiles <- mapM parseFile listOfPaths
let result = partitionEithers parsedFiles
case result of
-- no error in parsing, execute all files
([], filesToExecute) -> do
rets <- mapM (processAbacate cc runMIO) filesToExecute
rets <- mapM (processAbacate stepDefinitions runMIO) filesToExecute
unless (and rets) exitFailure
-- there were errors, print them and execute nothing
(filesWithError, _) -> do
Expand Down Expand Up @@ -174,7 +174,7 @@ t2d = D.text . T.unpack
-- | Run the 'Execution' monad.
runExecution :: (MonadIO m, Applicative m) =>
Chuchu m -> (m () -> IO ()) -> Execution m () -> IO ()
runExecution cc runMIO act = runMIO $ runReaderT act $ runChuchu cc
runExecution stepDefinitions runMIO act = runMIO $ runReaderT act $ runChuchu stepDefinitions


----------------------------------------------------------------------
Expand All @@ -188,15 +188,15 @@ processAbacate :: (MonadIO m, Applicative m) =>
-> (m () -> IO ())
-> Abacate
-> IO Bool
processAbacate cc runMIO feature = do
processAbacate stepDefinitions runMIO feature = do
-- Print feature description.
putDoc $ describeAbacate feature

-- Execute features.
let plans = createExecutionPlans feature
retVar <- liftIO $ I.newIORef True
let checkRet ret = unless ret $ liftIO $ I.writeIORef retVar False
mapM_ (runExecution cc runMIO . (>>= checkRet) . processExecutionPlan) plans
mapM_ (runExecution stepDefinitions runMIO . (>>= checkRet) . processExecutionPlan) plans
liftIO $ I.readIORef retVar


Expand Down

0 comments on commit 70e9914

Please sign in to comment.