From: simonpj@microsoft.com Date: Fri, 18 Dec 2009 10:54:34 +0000 (+0000) Subject: Comments only X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=e7dfa0c0430f77010dd41786d68615d19fc0e9fe Comments only --- 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]