summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/TyCl.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-05-07 18:03:36 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-13 02:13:02 -0400
commit72d086106d49bc18277f3a066e671e87e9b37a1b (patch)
treeff20c2926d4234c2cecc5d230859fc9fce09bb85 /compiler/GHC/Tc/TyCl.hs
parent7a02599afe836ac32c2e732671415d0afdfbf7fb (diff)
downloadhaskell-72d086106d49bc18277f3a066e671e87e9b37a1b.tar.gz
Refactor homeUnit
* rename thisPackage into homeUnit * document and refactor several Backpack things
Diffstat (limited to 'compiler/GHC/Tc/TyCl.hs')
-rw-r--r--compiler/GHC/Tc/TyCl.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 8ff9ad0d3e..6af35c77c2 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -61,6 +61,7 @@ import GHC.Types.Var
import GHC.Types.Var.Env
import GHC.Types.Var.Set
import GHC.Unit.Module
+import GHC.Unit.State
import GHC.Types.Name
import GHC.Types.Name.Set
import GHC.Types.Name.Env
@@ -172,7 +173,7 @@ tcTyClGroup (TyClGroup { group_tyclds = tyclds
-- Step 1.5: Make sure we don't have any type synonym cycles
; traceTc "Starting synonym cycle check" (ppr tyclss)
- ; this_uid <- fmap thisPackage getDynFlags
+ ; this_uid <- fmap homeUnit getDynFlags
; checkSynCycles this_uid tyclss tyclds
; traceTc "Done synonym cycle check" (ppr tyclss)
@@ -4009,7 +4010,7 @@ checkValidDataCon dflags existential_ok tc con
-- when we actually fill in the abstract type. As such, don't
-- warn in this case (it gives users the wrong idea about whether
-- or not UNPACK on abstract types is supported; it is!)
- , unitIsDefinite (thisPackage dflags)
+ , homeUnitIsDefinite dflags
= addWarnTc NoReason (bad_bang n (text "Ignoring unusable UNPACK pragma"))
where
is_strict = case strict_mark of