summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Module.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-11-26 15:34:46 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-22 14:58:53 -0500
commit29173f888892f18f3461880ef81ee7ba5fd539db (patch)
tree53c5cd78554d732c891a670954b22df178fb97ec /compiler/GHC/Tc/Module.hs
parent01ea56a22d7cf55f5285b130b357d3112c92de5b (diff)
downloadhaskell-29173f888892f18f3461880ef81ee7ba5fd539db.tar.gz
Factorize and document binder collect functions
Parameterize collect*Binders functions with a flag indicating if evidence binders should be collected. The related note in GHC.Hs.Utils has been updated. Bump haddock submodule
Diffstat (limited to 'compiler/GHC/Tc/Module.hs')
-rw-r--r--compiler/GHC/Tc/Module.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index a77f9fe71a..e8073d763e 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -1493,7 +1493,7 @@ tcTopSrcDecls (HsGroup { hs_tyclds = tycl_decls,
; fo_fvs = foldr (\gre fvs -> fvs `addOneFV` greMangledName gre)
emptyFVs fo_gres
- ; sig_names = mkNameSet (collectHsValBinders hs_val_binds)
+ ; sig_names = mkNameSet (collectHsValBinders CollNoDictBinders hs_val_binds)
`minusNameSet` getTypeSigNames val_sigs
-- Extend the GblEnv with the (as yet un-zonked)
@@ -2363,8 +2363,8 @@ tcUserStmt rdr_stmt@(L loc _)
; opt_pr_flag <- goptM Opt_PrintBindResult
; let print_result_plan
| opt_pr_flag -- The flag says "print result"
- , [v] <- collectLStmtBinders gi_stmt -- One binder
- = [mk_print_result_plan gi_stmt v]
+ , [v] <- collectLStmtBinders CollNoDictBinders gi_stmt -- One binder
+ = [mk_print_result_plan gi_stmt v]
| otherwise = []
-- The plans are:
@@ -2414,7 +2414,7 @@ tcGhciStmts stmts
io_ret_ty = mkTyConApp ioTyCon [ret_ty]
tc_io_stmts = tcStmtsAndThen GhciStmtCtxt tcDoStmt stmts
(mkCheckExpType io_ret_ty)
- names = collectLStmtsBinders stmts
+ names = collectLStmtsBinders CollNoDictBinders stmts
-- OK, we're ready to typecheck the stmts
; traceTc "GHC.Tc.Module.tcGhciStmts: tc stmts" empty