Skip to content
Snippets Groups Projects
Commit 2ea3dde1 authored by Edsko de Vries's avatar Edsko de Vries
Browse files

Split the PackageInstalled class

Introduce a new superclass HasInstalledPackageId:

    class Package pkg => HasInstalledPackageId pkg where
      installedPackageId :: pkg -> InstalledPackageId

    class HasInstalledPackageId pkg => PackageInstalled pkg where
      installedDepends :: pkg -> [InstalledPackageId]

Most functions that deal with the package index now just require
HasInstalledPackageId; only the functions that actually require the
dependencies still rely on PackageInstalled.

The point is that a ConfiguredPackage/ReadyPackage/PlanPackage can reasonably
be made an instance of HasInstalledPackageId, but not of PackageInstalled; that
will be the topic of the next, much larger, pull request.
parent 445ad90d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment