[commit: ghc] wip/all-inlinable: Check it is actually an Id (a93d4e6)

git at git.haskell.org git at git.haskell.org
Sun Jan 1 23:37:16 UTC 2017


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

On branch  : wip/all-inlinable
Link       : http://ghc.haskell.org/trac/ghc/changeset/a93d4e6c0eafa63ed49088e146b8becd8deaac32/ghc

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

commit a93d4e6c0eafa63ed49088e146b8becd8deaac32
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Sun Jan 1 23:37:00 2017 +0000

    Check it is actually an Id


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

a93d4e6c0eafa63ed49088e146b8becd8deaac32
 compiler/deSugar/DsBinds.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index 7ba0416..ad514c3 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -327,7 +327,7 @@ makeCorePair :: DynFlags -> Id -> Bool -> Arity -> CoreExpr -> (Id, CoreExpr)
 makeCorePair dflags gbl_id is_default_method dict_arity rhs
   | is_default_method                 -- Default methods are *always* inlined
   = (gbl_id `setIdUnfolding` mkCompulsoryUnfolding rhs, rhs)
-  |
+  | (isId gbl_id) &&
     (isEmptyInlineSpec inline_spec) &&
       (isOverloadedTy (idType gbl_id))
   = (gbl_id `setIdUnfolding` inlinable_unf, rhs)



More information about the ghc-commits mailing list