diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2020-12-14 13:41:58 -0500 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2020-12-14 13:41:58 -0500 |
| commit | 92377c27e1a48d0d3776f65c7074dfeb122b46db (patch) | |
| tree | dc55fdaebbcd8dbd0c1f53c80214c2996c7f3f0a /compiler/GHC/Tc | |
| parent | 7e9debd4ceb068effe8ac81892d2cabcb8f55850 (diff) | |
| download | haskell-92377c27e1a48d0d3776f65c7074dfeb122b46db.tar.gz | |
Revert "Optimise nullary type constructor usage"
This was inadvertently merged.
This reverts commit 7e9debd4ceb068effe8ac81892d2cabcb8f55850.
Diffstat (limited to 'compiler/GHC/Tc')
| -rw-r--r-- | compiler/GHC/Tc/Solver/Canonical.hs | 5 | ||||
| -rw-r--r-- | compiler/GHC/Tc/Utils/TcMType.hs | 1 | ||||
| -rw-r--r-- | compiler/GHC/Tc/Utils/TcType.hs | 5 |
3 files changed, 1 insertions, 10 deletions
diff --git a/compiler/GHC/Tc/Solver/Canonical.hs b/compiler/GHC/Tc/Solver/Canonical.hs index ce8bf24632..fd608c3314 100644 --- a/compiler/GHC/Tc/Solver/Canonical.hs +++ b/compiler/GHC/Tc/Solver/Canonical.hs @@ -956,11 +956,6 @@ can_eq_nc' -> Type -> Type -- RHS, after and before type-synonym expansion, resp -> TcS (StopOrContinue Ct) --- See Note [Comparing nullary type synonyms] in GHC.Core.Type. -can_eq_nc' _flat _rdr_env _envs ev eq_rel ty1@(TyConApp tc1 []) _ps_ty1 (TyConApp tc2 []) _ps_ty2 - | tc1 == tc2 - = canEqReflexive ev eq_rel ty1 - -- Expand synonyms first; see Note [Type synonyms and canonicalization] can_eq_nc' rewritten rdr_env envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2 | Just ty1' <- tcView ty1 = can_eq_nc' rewritten rdr_env envs ev eq_rel ty1' ps_ty1 ty2 ps_ty2 diff --git a/compiler/GHC/Tc/Utils/TcMType.hs b/compiler/GHC/Tc/Utils/TcMType.hs index e688dd5685..ccb9152e01 100644 --- a/compiler/GHC/Tc/Utils/TcMType.hs +++ b/compiler/GHC/Tc/Utils/TcMType.hs @@ -120,6 +120,7 @@ import GHC.Types.Id as Id import GHC.Types.Name import GHC.Types.Var.Set import GHC.Builtin.Types +import GHC.Builtin.Types.Prim import GHC.Types.Var.Env import GHC.Types.Name.Env import GHC.Utils.Misc diff --git a/compiler/GHC/Tc/Utils/TcType.hs b/compiler/GHC/Tc/Utils/TcType.hs index 6e4eea8f19..3e52419772 100644 --- a/compiler/GHC/Tc/Utils/TcType.hs +++ b/compiler/GHC/Tc/Utils/TcType.hs @@ -1581,11 +1581,6 @@ tc_eq_type keep_syns vis_only orig_ty1 orig_ty2 = go orig_env orig_ty1 orig_ty2 where go :: RnEnv2 -> Type -> Type -> Bool - -- See Note [Comparing nullary type synonyms] in GHC.Core.Type. - go _ (TyConApp tc1 []) (TyConApp tc2 []) - | tc1 == tc2 - = True - go env t1 t2 | not keep_syns, Just t1' <- tcView t1 = go env t1' t2 go env t1 t2 | not keep_syns, Just t2' <- tcView t2 = go env t1 t2' |
