diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-12-20 12:42:46 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-12-20 14:07:16 +0000 |
commit | a1c3ad0450baedadc223969dd2b09f59872a38e7 (patch) | |
tree | e71adc811629178451f275c418059b966766f7d7 /compiler | |
parent | 557178619aa20d7c7789fe2c6225396429c77f70 (diff) | |
download | haskell-a1c3ad0450baedadc223969dd2b09f59872a38e7.tar.gz |
Add solveLocalEqualities to tcHsPatSigType
This call plain missing, and as a result the casts
messed up deep-skolemisation in tcSubType
Fixes Trac #16033
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/typecheck/TcHsType.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 3b36281d4a..56a0ea0c34 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -2323,7 +2323,11 @@ tcHsPatSigType ctxt sig_ty = addSigCtxt ctxt hs_ty $ do { sig_tkvs <- mapM new_implicit_tv sig_vars ; (wcs, sig_ty) - <- tcWildCardBinders sig_wcs $ \ wcs -> + <- solveLocalEqualities "tcHsPatSigType" $ + -- Always solve local equalities if possible, + -- else casts get in the way of deep skolemisation + -- (Trac #16033) + tcWildCardBinders sig_wcs $ \ wcs -> tcExtendTyVarEnv sig_tkvs $ do { sig_ty <- tcHsOpenType hs_ty ; return (wcs, sig_ty) } |