Opened 3 years ago

Closed 2 years ago

Last modified 17 months ago

#9682 closed task (fixed)

Implement "Add bifunctor related classes to base"-Proposal (1/3)

Reported by: hvr Owned by: ekmett
Priority: normal Milestone: 7.10.1
Component: Core Libraries Version:
Keywords: Cc: core-libraries-committee@…, RyanGlScott, ekmett
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
Wiki Page:

Description

See original libraries@ proposal for more details

Change History (10)

comment:1 Changed 3 years ago by hvr

Differential Rev(s): Phab:D336

the first third of this task is up for review at Phab:D336

comment:2 Changed 3 years ago by Herbert Valerio Riedel <hvr@…>

In 0a290ca0ad599e40ca15a60cc988640f1cfcb4c2/ghc:

Add new `Data.Bifunctor` module (re #9682)

This adds the module `Data.Bifunctor` providing the
`Bifunctor(bimap,first,second)` class and a couple of instances

This module and the class were previously exported by the `bifunctors`
package.  In contrast to the original module all `INLINE` pragmas have
been removed.

Reviewed By: ekmett, austin, dolio

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

comment:4 Changed 2 years ago by RyanGlScott

Cc: RyanGlScott added

comment:5 Changed 2 years ago by hvr

Resolution: fixed
Status: newclosed

I think we can consider this particular task/ticket accomplished (as it made it into milestone:7.10.1)

comment:6 Changed 2 years ago by RyanGlScott

Did Bifoldable and Bitraversable (from the original proposal) not make it in?

comment:7 Changed 2 years ago by hvr

Summary: Implement "Add bifunctor related classes to base"-ProposalImplement "Add bifunctor related classes to base"-Proposal (1/3)

There wasn't enough time to get the other two classes into shape for milestone:7.10.1, they'll get their own Trac ticket

comment:8 Changed 2 years ago by hvr

For the rest of this task see #10448

comment:9 Changed 17 months ago by Ben Gamari <ben@…>

In 270d545/ghc:

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

comment:10 Changed 17 months ago by bgamari

Cc: ekmett added
Milestone: 7.10.18.2.1

comment:11 Changed 17 months ago by bgamari

Milestone: 8.2.17.10.1
Note: See TracTickets for help on using tickets.