Opened 4 years ago

Last modified 18 months ago

#10933 new feature request

REMOVED pragma

Reported by: goldfire Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.10.2
Keywords: Cc: dfeuer
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Say I have a function that's been deprecated for some time. Then I remove it. Some clients will still use the now-missing function. It would be nice to give a helpful error message, instead of a "symbol not found" error.

I thus propose a REMOVED pragma. The syntax is identical to DEPRECATED, except for the name of the pragma. Whenever a REMOVED function is mentioned, the error message includes the string from the pragma. (This includes trying to define a REMOVED class method in an instance.)

See Design/DeprecationMechanisms for more info and related efforts.

Change History (4)

comment:1 Changed 3 years ago by dfeuer

Cc: dfeuer added
Milestone: 8.4.1

comment:2 Changed 3 years ago by RyanGlScott

Should REMOVED pragmas mention the namespace of the removed thing? For example, if you had:

{-# REMOVED Foo #-}

Then without further information, Foo could be interpreted as both a data constructor and a type constructor.

comment:3 Changed 20 months ago by bgamari

Milestone: 8.4.18.6.1

This ticket won't be resolved in 8.4; remilestoning for 8.6. Do holler if you are affected by this or would otherwise like to work on it.

comment:4 Changed 18 months ago by bgamari

Milestone: 8.6.1

This probably ought to go through the GHC proposals process.

Note: See TracTickets for help on using tickets.