From e7dfa0c0430f77010dd41786d68615d19fc0e9fe Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Fri, 18 Dec 2009 10:54:34 +0000 Subject: [PATCH] Comments only --- compiler/typecheck/TcInstDcls.lhs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs index c7fc8ab..37bebcf 100644 --- a/compiler/typecheck/TcInstDcls.lhs +++ b/compiler/typecheck/TcInstDcls.lhs @@ -205,6 +205,9 @@ So the ClassOp is just a cast; and so is the dictionary function. No need for fancy BuiltIn rules. Indeed the BuiltinRule stuff does not work well for newtypes because it uses exprIsConApp_maybe. +The INLINE on df is vital, else $cop_list occurs just once and is inlined, +which is a disaster if $cop_list *itself* has an INLINE pragma. + Note [Subtle interaction of recursion and overlap] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -771,6 +774,7 @@ tc_inst_decl2 dfun_id (VanillaInst monobinds uprags standalone_deriv) dfun_id_w_fun | isNewTyCon (classTyCon clas) = dfun_id -- Just let the dfun inline; see Note [Single-method classes] + `setInlinePragma` alwaysInlinePragma | otherwise = dfun_id -- Do not inline; instead give it a magic DFunFunfolding -- See Note [ClassOp/DFun selection] -- 1.7.10.4