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

Removed obsolete Binary instances.

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