[Git][ghc/ghc][wip/int-index/visibility-check] Fix minor oversights
Vladislav Zavialov (@int-index)
gitlab at gitlab.haskell.org
Sun Mar 19 18:06:16 UTC 2023
Vladislav Zavialov pushed to branch wip/int-index/visibility-check at Glasgow Haskell Compiler / GHC
Commits:
90a9540f by Vladislav Zavialov at 2023-03-19T19:05:50+01:00
Fix minor oversights
- - - - -
4 changed files:
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/HsType.hs
- testsuite/tests/saks/should_fail/T18863a.stderr
- testsuite/tests/typecheck/should_fail/all.T
Changes:
=====================================
compiler/GHC/Tc/Gen/App.hs
=====================================
@@ -373,13 +373,10 @@ tcApp rn_expr exp_res_ty
-- Even though both app_res_rho and exp_res_ty are rho-types,
-- they may have nested polymorphism, so if deep subsumption
-- is on we must call tcSubType.
- -- Zonk app_res_rho first, because QL may have instantiated some
- -- delta variables to polytypes, and tcSubType doesn't expect that
- do { app_res_rho <- zonkQuickLook do_ql app_res_rho
- ; tcSubTypeDS rn_expr app_res_rho exp_res_ty }
+ tcSubTypeDS rn_expr app_res_rho exp_res_ty
-- See Note [Use sites of checkEqForallVis]
- -- This particualr call is commented out because we do not have
+ -- This particular call is commented out because we do not have
-- visible forall in types of terms yet (#281), so it is a no-op.
-- ; case exp_res_ty of
-- Check res_ty -> checkEqForallVis app_res_rho res_ty
=====================================
compiler/GHC/Tc/Gen/HsType.hs
=====================================
@@ -2556,7 +2556,7 @@ kcCheckDeclHeader_sig sig_kind name flav
AnyKind -> return () -- No signature
_ -> do { res_ki <- newExpectedKind ctx_k
; discardResult (unifyKind Nothing sig_res_kind' res_ki)
- ; checkEqForallVis res_ki sig_res_kind' } -- See Note [Use sites of checkEqForallVis]
+ ; checkEqForallVis sig_res_kind' res_ki } -- See Note [Use sites of checkEqForallVis]
-- Add more binders for data/newtype, so the result kind has no arrows
-- See Note [Datatype return kinds]
=====================================
testsuite/tests/saks/should_fail/T18863a.stderr
=====================================
@@ -1,6 +1,6 @@
T18863a.hs:9:1: error: [GHC-25115]
• Visibilities of forall-bound variables are not compatible
- Expected: forall i -> i -> *
- Actual: forall i. i -> *
+ Expected: forall i. i -> *
+ Actual: forall i -> i -> *
• In the data type declaration for ‘IDa’
=====================================
testsuite/tests/typecheck/should_fail/all.T
=====================================
@@ -672,8 +672,6 @@ test('T22924a', normal, compile_fail, [''])
test('T22924b', normal, compile_fail, [''])
test('T22940', normal, compile_fail, [''])
test('T19627', normal, compile_fail, [''])
-test('T20666', normal, compile_fail, [''])
-test('T20666a', normal, compile_fail, [''])
test('VisFlag1', normal, compile_fail, [''])
test('VisFlag1_ql', normal, compile_fail, [''])
test('VisFlag2', normal, compile_fail, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/90a9540fd1bffbe905ed356adbc60ffdc6249785
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/90a9540fd1bffbe905ed356adbc60ffdc6249785
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230319/3e23f656/attachment-0001.html>
More information about the ghc-commits
mailing list