summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcBinds.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2016-04-22 22:39:17 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2016-06-23 15:17:43 -0400
commit8035d1a5dc7290e8d3d61446ee4861e0b460214e (patch)
tree2e517feff25329abb942184ac4a7d20c9f77ba29 /compiler/typecheck/TcBinds.hs
parent9a34bf1985035858ece043bf38b47b6ff4b88efb (diff)
downloadhaskell-8035d1a5dc7290e8d3d61446ee4861e0b460214e.tar.gz
Fix #10963 and #11975 by adding new cmds to GHCi.
See the user's guide entry or the Note [TcRnExprMode] in TcRnDriver. Test cases: ghci/scripts/T{10963,11975}
Diffstat (limited to 'compiler/typecheck/TcBinds.hs')
-rw-r--r--compiler/typecheck/TcBinds.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs
index 7c45ac7b59..3a931cb6f6 100644
--- a/compiler/typecheck/TcBinds.hs
+++ b/compiler/typecheck/TcBinds.hs
@@ -710,15 +710,16 @@ tcPolyInfer rec_tc prag_fn tc_sig_fn mono bind_list
<- pushLevelAndCaptureConstraints $
tcMonoBinds rec_tc tc_sig_fn LetLclBndr bind_list
- ; let name_taus = [ (mbi_poly_name info, idType (mbi_mono_id info))
- | info <- mono_infos ]
- sigs = [ sig | MBI { mbi_sig = Just sig } <- mono_infos ]
+ ; let name_taus = [ (mbi_poly_name info, idType (mbi_mono_id info))
+ | info <- mono_infos ]
+ sigs = [ sig | MBI { mbi_sig = Just sig } <- mono_infos ]
+ infer_mode = if mono then ApplyMR else NoRestrictions
; mapM_ (checkOverloadedSig mono) sigs
; traceTc "simplifyInfer call" (ppr tclvl $$ ppr name_taus $$ ppr wanted)
; (qtvs, givens, ev_binds)
- <- simplifyInfer tclvl mono sigs name_taus wanted
+ <- simplifyInfer tclvl infer_mode sigs name_taus wanted
; let inferred_theta = map evVarPred givens
; exports <- checkNoErrs $