diff options
author | David Feuer <david.feuer@gmail.com> | 2017-01-17 15:55:39 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-17 15:56:28 -0500 |
commit | d360ec39bc9c1ba354c2254d4c4de505e3e10183 (patch) | |
tree | 402fe3c07b8650a19e61d672962b9bf61f4e34cc /compiler/deSugar/DsBinds.hs | |
parent | e195add1f203a0e169a2ea6e58be8d7989e9e0a4 (diff) | |
download | haskell-d360ec39bc9c1ba354c2254d4c4de505e3e10183.tar.gz |
Split mkInlineUnfolding into two functions
Previously, `mkInlineUnfolding` took a `Maybe` argument indicating
whether the caller requested a specific arity. This was not
self-documenting at call sites. Now we distinguish between
`mkInlineUnfolding` and `mkInlineUnfoldingWithArity`.
Reviewers: simonpj, austin, bgamari
Reviewed By: simonpj, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2933
Diffstat (limited to 'compiler/deSugar/DsBinds.hs')
-rw-r--r-- | compiler/deSugar/DsBinds.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs index bb1dc50ddc..833d3570b3 100644 --- a/compiler/deSugar/DsBinds.hs +++ b/compiler/deSugar/DsBinds.hs @@ -378,12 +378,12 @@ makeCorePair dflags gbl_id is_default_method dict_arity rhs -- And eta-expand the RHS; see Note [Eta-expanding INLINE things] , let real_arity = dict_arity + arity -- NB: The arity in the InlineRule takes account of the dictionaries - = ( gbl_id `setIdUnfolding` mkInlineUnfolding (Just real_arity) rhs + = ( gbl_id `setIdUnfolding` mkInlineUnfoldingWithArity real_arity rhs , etaExpand real_arity rhs) | otherwise = pprTrace "makeCorePair: arity missing" (ppr gbl_id) $ - (gbl_id `setIdUnfolding` mkInlineUnfolding Nothing rhs, rhs) + (gbl_id `setIdUnfolding` mkInlineUnfolding rhs, rhs) dictArity :: [Var] -> Arity -- Don't count coercion variables in arity |