Commit f79a07a7 authored by Robert Henderson's avatar Robert Henderson
Browse files

Removed obsolete Binary instances.

parent 178e2318
......@@ -38,9 +38,7 @@ data ConstraintScope
-- | The package with the specified name regardless of
-- qualifier.
| ScopeAnyQualifier PackageName
deriving (Eq, Show, Generic)
instance Binary ConstraintScope
deriving (Eq, Show)
-- | Constructor for a common use case: the constraint applies to
-- the package with the specified name when that package is a
......@@ -81,9 +79,7 @@ dispPackageProperty (PackagePropertyStanzas stanzas) =
-- | A package constraint consists of a scope plus a property
-- that must hold for all packages within that scope.
data PackageConstraint = PackageConstraint ConstraintScope PackageProperty
deriving (Eq, Show, Generic)
instance Binary PackageConstraint
deriving (Eq, Show)
-- | Pretty-prints a package constraint.
dispPackageConstraint :: PackageConstraint -> Disp.Doc
......
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Solver.Types.PackagePath
( PackagePath(..)
, Namespace(..)
......@@ -14,15 +13,11 @@ import Distribution.Package
import Distribution.Text
import qualified Text.PrettyPrint as Disp
import Distribution.Client.Compat.Prelude ((<<>>))
import GHC.Generics (Generic)
import Distribution.Compat.Binary (Binary)
-- | A package path consists of a namespace and a package path inside that
-- namespace.
data PackagePath = PackagePath Namespace Qualifier
deriving (Eq, Ord, Show, Generic)
instance Binary PackagePath
deriving (Eq, Ord, Show)
-- | Top-level namespace
--
......@@ -36,9 +31,7 @@ data Namespace =
--
-- For now we just number these (rather than giving them more structure).
| Independent Int
deriving (Eq, Ord, Show, Generic)
instance Binary Namespace
deriving (Eq, Ord, Show)
-- | Pretty-prints a namespace. The result is either empty or
-- ends in a period, so it can be prepended onto a qualifier.
......@@ -76,9 +69,7 @@ data Qualifier =
-- tracked only @pn2@, that would require us to pick only one
-- version of an executable over the entire install plan.)
| QualExe PackageName PackageName
deriving (Eq, Ord, Show, Generic)
instance Binary Qualifier
deriving (Eq, Ord, Show)
-- | Pretty-prints a qualifier. The result is either empty or
-- ends in a period, so it can be prepended onto a package name.
......@@ -97,9 +88,7 @@ dispQualifier (QualBase pn) = disp pn <<>> Disp.text "."
-- | A qualified entity. Pairs a package path with the entity.
data Qualified a = Q PackagePath a
deriving (Eq, Ord, Show, Generic)
instance Binary a => Binary (Qualified a)
deriving (Eq, Ord, Show)
-- | Qualified package name.
type QPN = Qualified PackageName
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment