[GHC] #9682: Implement "Add bifunctor related classes to base"-Proposal (1/3)

GHC ghc-devs at haskell.org
Sat Jun 18 22:23:21 UTC 2016


#9682: Implement "Add bifunctor related classes to base"-Proposal (1/3)
-------------------------------------+-------------------------------------
        Reporter:  hvr               |                Owner:  ekmett
            Type:  task              |               Status:  closed
        Priority:  normal            |            Milestone:  7.10.1
       Component:  Core Libraries    |              Version:
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10448            |  Differential Rev(s):  Phab:D336
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"270d545d557352d5f264247987ee8388f0812187/ghc" 270d545/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="270d545d557352d5f264247987ee8388f0812187"
 Add Bifoldable and Bitraversable to base

 This adds `Data.Bifoldable` and `Data.Bitraversable` from the
 `bifunctors` package to `base`, completing the migration started in
 D336.  This is fairly straightforward, although there were a suprising
 amount of reinternal organization in `base` that was needed for this to
 happen:

 * `Data.Foldable`, `Data.Traversable`, `Data.Bifoldable`, and
   `Data.Bitraversable` share some nonexported datatypes (e.g., `StateL`,
   `StateR`, `Min`, `Max`, etc.) to implement some instances. To avoid
   code duplication, I migrated this internal code to a new hidden
   module, `Data.Functor.Utils` (better naming suggestions welcome).

 * `Data.Traversable` and `Data.Bitraversable` also make use of an
   identity newtype, so I modified them to use
   `Data.Functor.Identity.Identity`. This has a ripple effect on several
   other modules, since I had to move instances around in order to avoid
   dependency cycles.

 Fixes #10448.

 Reviewers: ekmett, hvr, austin, bgamari

 Reviewed By: bgamari

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D2284

 GHC Trac Issues: #9682, #10448
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9682#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list