[commit: ghc] master: Delete commented-out code (97a50f8)

git at git.haskell.org git at git.haskell.org
Tue Jun 21 13:49:12 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/97a50f828e05ae285dfd8ffc890563fa0dd80fe4/ghc

>---------------------------------------------------------------

commit 97a50f828e05ae285dfd8ffc890563fa0dd80fe4
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Jun 20 15:50:53 2016 +0100

    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.


>---------------------------------------------------------------

97a50f828e05ae285dfd8ffc890563fa0dd80fe4
 compiler/typecheck/TcSimplify.hs | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index 5a727a8..4b69749 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]



More information about the ghc-commits mailing list