From ae7e3aeb50279f1d8f60f394b29facaebf0d2ab6 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 13 Jan 2020 16:18:18 -0500 Subject: [PATCH] Rethrow failures. --- bench/Tagging.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bench/Tagging.hs b/bench/Tagging.hs index c1ec6d907..e05fb10ec 100644 --- a/bench/Tagging.hs +++ b/bench/Tagging.hs @@ -10,7 +10,7 @@ module Tagging (benchmarks) where import Control.Carrier.Parse.Measured import Control.Carrier.Reader import Control.Concurrent.Async (forConcurrently) -import Control.Exception (displayException) +import Control.Exception (displayException, throwIO) import Control.Lens import Control.Monad import Data.Blob @@ -66,9 +66,7 @@ runTagging mode dir glob = nfIO . withOptions testOptions $ \ config logger stat let session = TaskSession config "-" False logger statter files <- globDir1 (compile glob) (Path.toString dir) let paths = Path.relFile <$> files - for_ paths $ \ file -> do - _ <- runTask session (runParse (parseSymbolsFilePath mode file)) - pure () + for_ paths (runTask session . runParse . parseSymbolsFilePath mode >=> either throwIO pure) parseSymbolsFilePath :: ( Has (Error SomeException) sig m