diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-02-08 13:38:09 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-02-08 15:08:50 +0000 |
commit | 6252b70a2fc61ff90c7abc93d2e9f05cf60ab47e (patch) | |
tree | 2502179b90cfcdd08d2274fbf9fc916422f15874 /compiler | |
parent | f79b9ec98ac1ea1d6ce1995a29e2a24737518e77 (diff) | |
download | haskell-6252b70a2fc61ff90c7abc93d2e9f05cf60ab47e.tar.gz |
A small, local refactoring of TcSimplify.usefulToFloat
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/typecheck/TcSimplify.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index 8a57877551..b992ef72ca 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -1760,12 +1760,12 @@ floatEqualities skols no_given_eqs , wanteds { wc_simple = remaining_simples } ) } where skol_set = mkVarSet skols - (float_eqs, remaining_simples) = partitionBag (usefulToFloat is_useful) simples - is_useful pred = tyCoVarsOfType pred `disjointVarSet` skol_set + (float_eqs, remaining_simples) = partitionBag (usefulToFloat skol_set) simples -usefulToFloat :: (TcPredType -> Bool) -> Ct -> Bool -usefulToFloat is_useful_pred ct -- The constraint is un-flattened and de-canonicalised - = is_meta_var_eq pred && is_useful_pred pred +usefulToFloat :: VarSet -> Ct -> Bool +usefulToFloat skol_set ct -- The constraint is un-flattened and de-canonicalised + = is_meta_var_eq pred && + (tyCoVarsOfType pred `disjointVarSet` skol_set) where pred = ctPred ct |