Commit fb91c35e authored by bjorn@bringert.net's avatar bjorn@bringert.net
Browse files

Added deriving Show to all the types in Hackage.Types, useful for debugging.

parent 547f93b6
......@@ -25,6 +25,7 @@ data PkgInfo = PkgInfo {
pkgRepo :: Repo,
pkgDesc :: GenericPackageDescription
}
deriving (Show)
pkgInfoId :: PkgInfo -> PackageIdentifier
pkgInfoId = package . packageDescription . pkgDesc
......@@ -37,7 +38,7 @@ data Action
| InfoCmd
| HelpCmd
| ListCmd
deriving (Eq)
deriving (Show,Eq)
data Option = OptCompilerFlavor CompilerFlavor
| OptCompiler FilePath
......@@ -68,6 +69,7 @@ data ConfigFlags = ConfigFlags {
configVerbose :: Verbosity,
configUserInstall :: Bool -- ^--user-install flag
}
deriving (Show)
data Repo = Repo {
repoName :: String,
......@@ -78,6 +80,7 @@ data Repo = Repo {
data ResolvedPackage = Installed Dependency PackageIdentifier
| Available Dependency PkgInfo [String] [ResolvedPackage]
| Unavailable Dependency
deriving (Show)
fulfills :: ResolvedPackage -> Dependency
fulfills (Installed d _) = d
......@@ -89,3 +92,4 @@ data UnresolvedDependency
{ dependency :: Dependency
, depOptions :: [String]
}
deriving (Show)
\ No newline at end of file
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