provide a Show instance that works for all WorkerPools

This commit is contained in:
Joey Hess 2019-11-14 11:00:59 -04:00
parent 6e59c652d2
commit 20d9a9b662
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -20,7 +20,14 @@ data WorkerPool t = WorkerPool
-- but there can temporarily be fewer values, when a thread is -- but there can temporarily be fewer values, when a thread is
-- changing between stages. -- changing between stages.
} }
deriving (Show)
instance Show (WorkerPool t) where
show p = unwords
[ "WorkerPool"
, show (usedStages p)
, show (workerList p)
, show (length (spareVals p))
]
-- | A worker can either be idle or running an Async action. -- | A worker can either be idle or running an Async action.
-- And it is used for some stage. -- And it is used for some stage.