[GHC] #13058: Use coercions to implement fmapDefault and foldMapDefault
GHC
ghc-devs at haskell.org
Thu Jan 5 22:01:36 UTC 2017
#13058: Use coercions to implement fmapDefault and foldMapDefault
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: dfeuer
Type: task | Status: patch
Priority: normal | Milestone: 8.2.1
Component: Core Libraries | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2916
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"5f91ac89a38eb128d374a04c741bbd81c41fed37/ghc" 5f91ac8/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="5f91ac89a38eb128d374a04c741bbd81c41fed37"
Coerce for fmapDefault and foldMapDefault
Define `fmapDefault = coerce traverse` and `foldMapDefault = coerce
traverse`. This ensures that we won't get unnecessary allocation and
indirection when the arguments don't inline.
Fixes #13058
Reviewers: ekmett, RyanGlScott, austin, hvr, bgamari
Reviewed By: RyanGlScott
Subscribers: simonpj, RyanGlScott, thomie
Differential Revision: https://phabricator.haskell.org/D2916
GHC Trac Issues: #13058
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13058#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list