1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00

Rethrow failures.

This commit is contained in:
Rob Rix 2020-01-13 16:18:18 -05:00
parent 174cce6c73
commit ae7e3aeb50
No known key found for this signature in database
GPG Key ID: 2BE643E01DC032AE

View File

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