{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.TestSuiteInterface (
TestSuiteInterface(..),
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.TestType
import Distribution.ModuleName
import Distribution.Version
data TestSuiteInterface =
TestSuiteExeV10 Version FilePath
| TestSuiteLibV09 Version ModuleName
| TestSuiteUnsupported TestType
deriving (Eq, Generic, Read, Show, Typeable, Data)
instance Binary TestSuiteInterface
instance Structured TestSuiteInterface
instance NFData TestSuiteInterface where rnf = genericRnf
instance Monoid TestSuiteInterface where
mempty = TestSuiteUnsupported (TestTypeUnknown mempty nullVersion)
mappend = (<>)
instance Semigroup TestSuiteInterface where
a <> (TestSuiteUnsupported _) = a
_ <> b = b