module Distribution.Types.AbiDependency where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Parsec
import Distribution.Pretty
import qualified Distribution.Compat.CharParsing as P
import qualified Distribution.Package as Package
import qualified Text.PrettyPrint as Disp
data AbiDependency = AbiDependency {
depUnitId :: Package.UnitId,
depAbiHash :: Package.AbiHash
}
deriving (Eq, Generic, Read, Show, Typeable)
instance Pretty AbiDependency where
pretty (AbiDependency uid abi) =
pretty uid <<>> Disp.char '=' <<>> pretty abi
instance Parsec AbiDependency where
parsec = do
uid <- parsec
_ <- P.char '='
abi <- parsec
return (AbiDependency uid abi)
instance Binary AbiDependency
instance Structured AbiDependency
instance NFData AbiDependency where rnf = genericRnf