From 1fd4c0be9efe017ed9f6f1dd9b5d9ab70b1bcee2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 14 Aug 2023 20:47:00 -0400 Subject: Lint concurrently Roughly a 2x speedup. --- Biz/Lint.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Biz/Lint.hs') diff --git a/Biz/Lint.hs b/Biz/Lint.hs index d7db9d6..b1cc0d4 100644 --- a/Biz/Lint.hs +++ b/Biz/Lint.hs @@ -14,6 +14,7 @@ import Biz.Namespace (Ext (..), Namespace (..)) import qualified Biz.Namespace as Namespace import Biz.Test ((@=?)) import qualified Biz.Test as Test +import qualified Control.Concurrent.Async as Async import qualified Data.String as String import qualified Data.Text as Text import qualified System.Directory as Directory @@ -119,7 +120,7 @@ hlint = { exe = "hlint", checkArgs = [], -- needs apply-refact >0.9.1.0, which needs ghc >9 - --fixArgs = Just ["--refactor", "--refactor-options=-i"] + -- fixArgs = Just ["--refactor", "--refactor-options=-i"] fixArgs = Nothing } @@ -152,7 +153,7 @@ run :: Mode -> [FilePath] -> IO [Result] run mode paths = do cwd <- Directory.getCurrentDirectory root <- Environment.getEnv "BIZ_ROOT" - concat FilePath -> FilePath -> FilePath -> IO [Result] runOne mode root cwd path_ = results +> traverse_ printResult >> results -- cgit v1.2.3