diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2022-11-28 15:36:25 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2022-11-29 08:37:50 +0000 |
commit | 3e695c2bfd97095a44f69f03b607e05876bbdc11 (patch) | |
tree | dde8bdf59b91ca0948842e59c1f93dc4b47e5c09 /compiler/GHC/Core/TyCon.hs | |
parent | b5d9558e6dcef2a6f1c315f5058eafd7113f9860 (diff) | |
download | haskell-wip/T22516.tar.gz |
Use mkNakedFunTy in tcPatSynSigwip/T22516
As #22521 showed, in tcPatSynSig we make a "fake type" to
kind-generalise; and that type has unzonked type variables in it. So
we must not use `mkFunTy` (which checks FunTy's invariants) via
`mkPhiTy` when building this type. Instead we need to use
`mkNakedFunTy`.
Easy fix.
Diffstat (limited to 'compiler/GHC/Core/TyCon.hs')
-rw-r--r-- | compiler/GHC/Core/TyCon.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs index 0cbb9ece43..49f33fdc21 100644 --- a/compiler/GHC/Core/TyCon.hs +++ b/compiler/GHC/Core/TyCon.hs @@ -137,7 +137,7 @@ import GHC.Prelude import GHC.Platform import {-# SOURCE #-} GHC.Core.TyCo.Rep - ( Kind, Type, PredType, mkForAllTy, mkNakedKindFunTy, mkNakedTyConTy ) + ( Kind, Type, PredType, mkForAllTy, mkNakedFunTy, mkNakedTyConTy ) import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType ) import {-# SOURCE #-} GHC.Builtin.Types @@ -525,8 +525,8 @@ mkTyConKind bndrs res_kind = foldr mk res_kind bndrs where mk :: TyConBinder -> Kind -> Kind mk (Bndr tv (NamedTCB vis)) k = mkForAllTy (Bndr tv vis) k - mk (Bndr tv (AnonTCB af)) k = mkNakedKindFunTy af (varType tv) k - -- mkNakedKindFunTy: see Note [Naked FunTy] in GHC.Builtin.Types + mk (Bndr tv (AnonTCB af)) k = mkNakedFunTy af (varType tv) k + -- mkNakedFunTy: see Note [Naked FunTy] in GHC.Builtin.Types -- | (mkTyConTy tc) returns (TyConApp tc []) -- but arranges to share that TyConApp among all calls |