{- Copyright 2016 Joey Hess - - Licensed under the GNU AGPL version 3 or higher. -} module Types.Concurrency where import Utility.PartialPrelude data Concurrency = NonConcurrent | Concurrent Int | ConcurrentPerCpu parseConcurrency :: String -> Maybe Concurrency parseConcurrency "cpus" = Just ConcurrentPerCpu parseConcurrency "cpu" = Just ConcurrentPerCpu parseConcurrency s = Concurrent <$> readish s