[commit: ghc] master: Refactor package flags into several distinct types. (998739d)

git at git.haskell.org git at git.haskell.org
Tue Dec 22 23:23:14 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/998739df630cbee7d006329a76786239e3e2c0be/ghc

>---------------------------------------------------------------

commit 998739df630cbee7d006329a76786239e3e2c0be
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Fri Dec 18 12:09:36 2015 -0800

    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: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: austin, bgamari, duncan
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1659


>---------------------------------------------------------------

998739df630cbee7d006329a76786239e3e2c0be
 compiler/main/DynFlags.hs |  23 ++++--
 compiler/main/Packages.hs | 199 +++++++++++++++++++++++++++-------------------
 2 files changed, 136 insertions(+), 86 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 998739df630cbee7d006329a76786239e3e2c0be


More information about the ghc-commits mailing list