summaryrefslogtreecommitdiff
path: root/compiler/specialise/Specialise.lhs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-17 10:38:53 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-17 10:38:53 +0100
commit79ee264a8df1c9c9617fbe109a3cdfc51bb3d42a (patch)
tree99d089ec340b5e2ec5fa511a7fd594dc9bc0b575 /compiler/specialise/Specialise.lhs
parentb0f4c44ed777af599daf35035b0830b35e57fa4a (diff)
downloadhaskell-79ee264a8df1c9c9617fbe109a3cdfc51bb3d42a.tar.gz
Pass DynFlags to the ru_try functions of built-in rules
Diffstat (limited to 'compiler/specialise/Specialise.lhs')
-rw-r--r--compiler/specialise/Specialise.lhs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/specialise/Specialise.lhs b/compiler/specialise/Specialise.lhs
index 4307ff75df..083d1502bb 100644
--- a/compiler/specialise/Specialise.lhs
+++ b/compiler/specialise/Specialise.lhs
@@ -1063,9 +1063,9 @@ specCalls subst rules_for_me calls_for_me fn rhs
body = mkLams (drop n_dicts rhs_ids) rhs_body
-- Glue back on the non-dict lambdas
- already_covered :: [CoreExpr] -> Bool
- already_covered args -- Note [Specialisations already covered]
- = isJust (lookupRule (const True) realIdUnfolding
+ already_covered :: DynFlags -> [CoreExpr] -> Bool
+ already_covered dflags args -- Note [Specialisations already covered]
+ = isJust (lookupRule dflags (const True) realIdUnfolding
(substInScope subst)
fn args rules_for_me)
@@ -1119,7 +1119,8 @@ specCalls subst rules_for_me calls_for_me fn rhs
ty_args = mk_ty_args call_ts poly_tyvars
inst_args = ty_args ++ map Var inst_dict_ids
- ; if already_covered inst_args then
+ ; dflags <- getDynFlags
+ ; if already_covered dflags inst_args then
return Nothing
else do
{ -- Figure out the type of the specialised function