Ad-hoc class method deprecations
Needs RevisionPublic

Authored by quchen on Sep 29 2015, 4:57 PM.



Warn when a class implements a method that is to be removed in the future.

A more general mechanism of achieving this would be by introducing e.g. a REMOVED pragma, but since the 8.0 release is somewhat close the hardcoded ad-hoc version will have to do for the time being.

To do:

  • Write tests
  • Fix warnings in GHC
  • Flesh out warnings, link to wiki article with details about fixing them (e.g. don't implement *> in terms of >>)
  • Figure out how to be two versions bootstrap compatible

Diff Detail

rGHC Glasgow Haskell Compiler
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 6698
Build 7855: GHC Patch Validation (amd64/Linux)
quchen updated this revision to Diff 4350.Sep 29 2015, 4:57 PM
quchen retitled this revision from to Ad-hoc class method deprecations.
quchen updated this object.
quchen edited the test plan for this revision. (Show Details)
quchen set the repository for this revision to rGHC Glasgow Haskell Compiler.
quchen changed the visibility from "Public (No Login Required)" to "quchen (David Luposchainsky)".
quchen added a reviewer: hvr.Sep 30 2015, 10:01 AM
quchen updated this revision to Diff 4356.Sep 30 2015, 10:19 AM
quchen updated this revision to Diff 4358.Sep 30 2015, 2:20 PM
quchen updated this object.
quchen changed the visibility from "quchen (David Luposchainsky)" to "Public (No Login Required)".
hvr awarded a token.Sep 30 2015, 2:25 PM
quchen updated this object.Sep 30 2015, 2:47 PM
quchen edited edge metadata.
austin requested changes to this revision.Oct 13 2015, 12:56 AM
austin edited edge metadata.

I mean, it looks fine, but at the minimum it needs some tests so we can actually confirm it's building/working in a good way. The rest can be iteratively improved upon with a few more review cycles, but overall I'm OK with the hardcoded approach for now.


A++, thanks for the comments!

This revision now requires changes to proceed.Oct 13 2015, 12:56 AM

The patch is a bit on hold right now until the heated discussion about the changes this is supposed to help with comes to some sort of conclusion. But yes, tests are definitely something left open. Another issue is that GHC warns quite a bit during bootstrapping, and fixing those warnings is too boring to do it speculatively. Let's see where the discussions are headed!

quchen updated this revision to Diff 5093.Nov 14 2015, 1:36 PM
quchen edited edge metadata.
quchen marked an inline comment as done.

Add the patch I've had lying around forever that includes a test

bgamari requested changes to this revision.Nov 26 2015, 8:48 AM
bgamari edited edge metadata.

Bumping out of review queue due to inactivity.

@quchen, do you envision continuing this work?

This revision now requires changes to proceed.Nov 26 2015, 8:48 AM
hvr edited edge metadata.Nov 26 2015, 9:03 AM

@bgamari well, this patch ad-hoc deprecations are tailored towards MRP whose decision has been punted. At this point it makes more sense to generalise this patch to instead implement

I've got some unfinished patch for handling the parsing part, but what's missing is the part on how to pass-thru the information to the renamer (where this patch sits).

What @hvr said. We'll probably be able to use this patch to implement the generalized version though, but I'm not sure what the workflow for this is - close this diff? Leave it hanging around for documentation purposes? Delete it?

austin resigned from this revision.Nov 6 2017, 10:14 PM