Skip to content
Snippets Groups Projects
Commit 998739df authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Refactor package flags into several distinct types.


Summary:
Previously, all package flags (-package, -trust-package,
-ignore-package) were bundled up into a single packageFlags
field in DynFlags, under a single type.  This commit separates
them based on what they do.

This is a nice improvement, because it means that Packages can
then be refactored so that a number of functions are "tighter":

    - We know longer have to partition PackageFlags into
      the ignore flag and other flags; ignore flags are just
      put into their own field.

    - Trust flags modify the package database, but exposed
      flags do not (they modify the visibility map); now
      applyPackageFlag and applyTrustFlag have tighter signatures
      which reflect this.

This patch was motivated by the need to have a separate visibility
map for plugin packages, which will be in a companion patch.

Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>

Test Plan: validate

Reviewers: austin, bgamari, duncan

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1659
parent 21b25dff
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