diff options
author | Phuong Trinh <lolotp@fb.com> | 2018-11-16 23:16:31 +0000 |
---|---|---|
committer | Ray Shih <rayshih@fb.com> | 2020-07-14 12:13:56 -0700 |
commit | 24b4ae985f33bbf225e83a9bc0ce461ed68b0e49 (patch) | |
tree | d820664e521be8f080f82da75ef761733e6cfbb6 | |
parent | 3de545ab21a11781ca114e027e9629053d62ace4 (diff) | |
download | haskell-24b4ae985f33bbf225e83a9bc0ce461ed68b0e49.tar.gz |
[fbonly] Reapply patch for trac #12091
Summary:
This fix for this was lost after porting over of the minimal-bindings-retention flag patch.
Test Plan:
```
make
make TEST=12091
```
(cherry picked from commit b5421fa78ede9f4bbbc6523790ace3d3bf47524f)
-rw-r--r-- | compiler/deSugar/Desugar.hs | 3 | ||||
-rw-r--r-- | compiler/main/HscTypes.hs | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs index 25b256badf..3ec34cb008 100644 --- a/compiler/deSugar/Desugar.hs +++ b/compiler/deSugar/Desugar.hs @@ -321,7 +321,8 @@ addExportFlagsAndRules hsc_env exports keep_alive mod rules prs -- isExternalName separates the user-defined top-level names from those -- introduced by the type checker. is_exported :: Name -> Bool - is_exported | moduleRetainsAllBindings hsc_env mod = isExternalName + is_exported | moduleRetainsAllBindings hsc_env mod + || isInteractiveModule mod = isExternalName | otherwise = (`elemNameSet` exports) {- diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs index 573c2e2719..97f7bb86ff 100644 --- a/compiler/main/HscTypes.hs +++ b/compiler/main/HscTypes.hs @@ -3166,8 +3166,7 @@ moduleRetainsAllBindings hsc_env mod case bindingsRetentionMode dflags of Full -> targetRetainsAllBindings target Minimal -> - targetRetainsAllBindings target && - (isInteractiveModule mod || moduleNameIsInHscTargets) + targetRetainsAllBindings target && moduleNameIsInHscTargets where thisModSummary = mgLookupModule (hsc_mod_graph hsc_env) mod moduleNameIsInHscTargets = any isThisModule (hsc_targets hsc_env) |