mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Evaluate diffs in parallel.
This commit is contained in:
parent
35cdc611ad
commit
b4d72cc62c
@ -89,6 +89,7 @@ library
|
||||
, MonadRandom
|
||||
, mtl
|
||||
, optparse-applicative
|
||||
, parallel
|
||||
, pointed
|
||||
, protolude
|
||||
, recursion-schemes
|
||||
|
@ -16,6 +16,7 @@ module Command
|
||||
import Command.Parse
|
||||
import Control.Exception (catch)
|
||||
import Control.Monad.Free.Freer
|
||||
import Control.Parallel.Strategies
|
||||
import qualified Data.ByteString as B
|
||||
import Data.Functor.Both
|
||||
import Data.List ((\\))
|
||||
@ -83,8 +84,8 @@ maybeDiff terms = case runJoin terms of
|
||||
(Nothing, Nothing) -> return Nothing
|
||||
|
||||
-- | Render a diff using the specified renderer.
|
||||
renderDiffs :: Monoid output => DiffRenderer fields output -> [(Both SourceBlob, Diff (Syntax Text) (Record fields))] -> Command output
|
||||
renderDiffs renderer diffs = RenderDiffs renderer diffs `Then` return
|
||||
renderDiffs :: (NFData (Record fields), Monoid output) => DiffRenderer fields output -> [(Both SourceBlob, Diff (Syntax Text) (Record fields))] -> Command output
|
||||
renderDiffs renderer diffs = RenderDiffs renderer (diffs `using` parTraversable (parTuple2 r0 rdeepseq)) `Then` return
|
||||
|
||||
|
||||
-- Evaluation
|
||||
|
Loading…
Reference in New Issue
Block a user