diff options
author | Richard Eisenberg <rae@richarde.dev> | 2021-01-04 11:07:00 -0500 |
---|---|---|
committer | Richard Eisenberg <rae@richarde.dev> | 2021-01-05 12:32:46 -0500 |
commit | bce84a3dd6a2a119245ae39909309675f9d717cc (patch) | |
tree | 664fb4877759dcc82f5278b27d26c57be163c8d1 /compiler/GHC/Tc/TyCl/PatSyn.hs | |
parent | 9809474462527d36b9e237ee7012b08e0845b714 (diff) | |
download | haskell-wip/T17567.tar.gz |
Never Anyify during kind inferencewip/T17567
See Note [Error on unconstrained meta-variables] in TcMType.
Close #17301
Close #17567
Close #17562
Close #15474
Diffstat (limited to 'compiler/GHC/Tc/TyCl/PatSyn.hs')
-rw-r--r-- | compiler/GHC/Tc/TyCl/PatSyn.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/TyCl/PatSyn.hs b/compiler/GHC/Tc/TyCl/PatSyn.hs index 13b5da759f..622f991a57 100644 --- a/compiler/GHC/Tc/TyCl/PatSyn.hs +++ b/compiler/GHC/Tc/TyCl/PatSyn.hs @@ -222,7 +222,7 @@ mkProvEvidence ev_id dependentArgErr :: (Id, DTyCoVarSet) -> TcM () -- See Note [Coercions that escape] dependentArgErr (arg, bad_cos) - = addErrTc $ + = failWithTc $ -- fail here: otherwise we get downstream errors vcat [ text "Iceland Jack! Iceland Jack! Stop torturing me!" , hang (text "Pattern-bound variable") 2 (ppr arg <+> dcolon <+> ppr (idType arg)) @@ -674,11 +674,12 @@ tc_patsyn_finish lname dir is_infix lpat' = do { -- Zonk everything. We are about to build a final PatSyn -- so there had better be no unification variables in there - (ze, univ_tvs') <- zonkTyVarBinders univ_tvs + ; ze <- mkEmptyZonkEnv NoFlexi + ; (ze, univ_tvs') <- zonkTyVarBindersX ze univ_tvs ; req_theta' <- zonkTcTypesToTypesX ze req_theta - ; (ze, ex_tvs') <- zonkTyVarBindersX ze ex_tvs + ; (ze, ex_tvs') <- zonkTyVarBindersX ze ex_tvs ; prov_theta' <- zonkTcTypesToTypesX ze prov_theta - ; pat_ty' <- zonkTcTypeToTypeX ze pat_ty + ; pat_ty' <- zonkTcTypeToTypeX ze pat_ty ; arg_tys' <- zonkTcTypesToTypesX ze arg_tys ; let (env1, univ_tvs) = tidyTyCoVarBinders emptyTidyEnv univ_tvs' |