{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.BenchmarkInterface (
BenchmarkInterface(..),
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.BenchmarkType
import Distribution.Version
data BenchmarkInterface =
BenchmarkExeV10 Version FilePath
| BenchmarkUnsupported BenchmarkType
deriving (Eq, Generic, Read, Show, Typeable, Data)
instance Binary BenchmarkInterface
instance Structured BenchmarkInterface
instance NFData BenchmarkInterface where rnf = genericRnf
instance Monoid BenchmarkInterface where
mempty = BenchmarkUnsupported (BenchmarkTypeUnknown mempty nullVersion)
mappend = (<>)
instance Semigroup BenchmarkInterface where
a <> (BenchmarkUnsupported _) = a
_ <> b = b