move Data.Functor.(Classes, Compose, Product, Sum) into base
ClosedPublic

Authored by RyanGlScott on Nov 28 2015, 12:06 PM.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
strake updated this revision to Diff 5345.Nov 28 2015, 12:06 PM
strake retitled this revision from to move Data.Functor.(Classes, Compose, Product, Sum) into base.
strake updated this object.
strake edited the test plan for this revision. (Show Details)
strake set the repository for this revision to rGHC Glasgow Haskell Compiler.
strake updated the Trac tickets for this revision.
hvr requested changes to this revision.Nov 28 2015, 1:58 PM
hvr edited edge metadata.

Macro we_have_sort_of_a_problem_here:

...if you could add a libraries/base/changelog.md entry... that'd be great! :-)

libraries/base/Data/Functor/Classes.hs
3

AutoDeriveTypeable is redundant

10

maintainer needs to change

34

@since 4.9.0.0 annotations missing

361

since when were these deprecated?

@ekmett do we really want to bring in deprecated items into base?

libraries/base/Data/Functor/Compose.hs
4

redundant

11

...

16

@since...

libraries/base/Data/Functor/Product.hs
4

...

11

...

16

@since...

libraries/base/Data/Functor/Sum.hs
4

...

11

...

16

@since...

libraries/transformers
1

we need to get this one merged upstream before we can land this in ghc (see comment in D1544)

This revision now requires changes to proceed.Nov 28 2015, 1:58 PM
RyanGlScott requested changes to this revision.Nov 30 2015, 12:36 PM
RyanGlScott edited edge metadata.

What about items (2) and (3) from the original proposal?

For (2), introducing Data.Functor.Const seems especially pertinent now that Constant in transformers is poly-kinded, but Const in base isn't. :( If we migrate Const to Data.Functor.Const and turn on PolyKinds, that would also knock out Trac #10039.

For (3), make sure the newly introduced data types have derived Data, Generic, and Generic1 instances.

ekmett requested changes to this revision.Dec 8 2015, 9:49 AM
ekmett edited edge metadata.

No objection to polykinding Const, and adding the missing instances Ryan raised.

libraries/base/Data/Functor/Classes.hs
361

We may have to bring in the deprecated bits for a release as the API on this was in the process of actively changing.

hvr added a comment.EditedDec 15 2015, 7:48 AM

@RyanGlScott & @strake are you going to pursue this further? Otherwise this may not make it into GHC 8.0 :-/

In D1543#48273, @hvr wrote:

@RyanGlScott & @strake are you going to pursue this further? Otherwise this may not make it into GHC 8.0 :-/

I would like to see this get done, but given how small the remaining window is for 8.0, we might have to push this back to 8.2. In addition to the normal delays associated with a module migration like this, I also have some reservations about the new Data.Functor.Classes that I would like to be addressed before going forward with this.

hvr added a comment.Dec 15 2015, 3:27 PM

@RyanGlScott thanks for trying to push this forward; it's not the end of the world if this slips into 8.2 if there are serious issues. However, this sounds like transformers may have deeper issues that are worthwhile to address for GHC 8.0 anyways...

hvr added a comment.Dec 17 2015, 1:00 AM

@RyanGlScott yesterday the transformers submodule got updated to the latest snapshot, does this allow Trac #11135 to proceed?

@hvr It does... I just need to get myself to write a patch for transformers. I'll try to get this done quickly.

hvr added a comment.Dec 17 2015, 1:26 AM

Great... just lemme know when it's time to sync up the repos again and land something... :-)

Alright, transformers has been updated to conditionally expose Data.Functor.Classes et al. @hvr, can you update the GHC transformers mirror?

Once that's done, we can close D1544 and get moving and the remaining changes for this Diff. (Note that adding Data.Functor.Const is now out of the scope of this Diff, since that is covered in D1630.)

hvr added a comment.Dec 17 2015, 12:09 PM

synced... (fyi, the darcs2git mirroring polls only once an hour... in case you were wondering why the new commits didn't appear it the darcs-mirror repo)

RyanGlScott commandeered this revision.Dec 17 2015, 12:12 PM
RyanGlScott edited reviewers, added: strake; removed: RyanGlScott.

Awesome, I'll try to finish this up soon.

RyanGlScott updated this revision to Diff 5809.EditedDec 17 2015, 1:12 PM
RyanGlScott edited edge metadata.
RyanGlScott removed rGHC Glasgow Haskell Compiler as the repository for this revision.

This updates to use the latest transformers (I manually uploaded a git diff since checking out the patch failed horribly for some reason).

This revision was automatically updated to reflect the committed changes.
hvr added a comment.Dec 17 2015, 3:07 PM

Thanks to you all!

(I manually uploaded a git diff since checking out the patch failed horribly for some reason).

Yes... differentials uploaded manually are a big mess currently... and require special care :-/

Anyway, I hope Harbormaster won't complain about what I just pushed...