summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-06-20 15:50:53 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-06-21 14:52:56 +0100
commit97a50f828e05ae285dfd8ffc890563fa0dd80fe4 (patch)
treec13cfa554ea5b100535cf85e60bf28efa134b7e9 /compiler
parentd09e982c534b20908064f36d701a1a3a6a2eb55a (diff)
downloadhaskell-97a50f828e05ae285dfd8ffc890563fa0dd80fe4.tar.gz
Delete commented-out code
Richard: in a previous commit I combined the two case for decideQuantification This commit just deletes the old code. I'm afraid it'll leave you with a merge conflict though, with your stuff on generalisation.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcSimplify.hs30
1 files changed, 0 insertions, 30 deletions
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index 5a727a85ed..4b6974954b 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -771,36 +771,6 @@ decideQuantification
, [PredType] ) -- and this context (fully zonked)
-- See Note [Deciding quantification]
decideQuantification apply_mr name_taus psig_theta candidates
-{-
- | apply_mr -- Apply the Monomorphism restriction
- = do { gbl_tvs <- tcGetGlobalTyCoVars
- ; zonked_taus <- mapM TcM.zonkTcType (psig_theta ++ taus)
- -- psig_theta: see Note [Quantification and partial signatures]
- ; let zonked_dvs = splitDepVarsOfTypes zonked_taus
- zonked_tkvs = tcDepVarSet zonked_dvs
- constrained_tvs = tyCoVarsOfTypes constraints `unionVarSet`
- filterVarSet isCoVar zonked_tkvs
- mono_tvs = gbl_tvs `unionVarSet` constrained_tvs
-
- ; qtvs <- quantifyZonkedTyVars mono_tvs zonked_dvs
-
- -- Warn about the monomorphism restriction
- ; warn_mono <- woptM Opt_WarnMonomorphism
- ; let mr_bites = constrained_tvs `intersectsVarSet` zonked_tkvs
- ; warnTc (Reason Opt_WarnMonomorphism) (warn_mono && mr_bites) $
- hang (text "The Monomorphism Restriction applies to the binding"
- <> plural bndrs <+> text "for" <+> pp_bndrs)
- 2 (text "Consider giving a type signature for"
- <+> if isSingleton bndrs then pp_bndrs
- else text "these binders")
-
- -- All done
- ; traceTc "decideQuantification 1" (vcat [ppr constraints, ppr gbl_tvs, ppr mono_tvs
- , ppr qtvs, ppr mr_bites])
- ; return (qtvs, []) }
-
- | otherwise
--}
= do { gbl_tvs <- tcGetGlobalTyCoVars
; zonked_taus <- mapM TcM.zonkTcType (psig_theta ++ taus)
-- psig_theta: see Note [Quantification and partial signatures]