Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#658 closed bug (fixed)

DEPRECATED doesn't work for data constructors

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


In trying to understand the documentation on pragmas I could not figure out where to place a pragma of the form: {-# DEPRECATED f, C, T "Don't use these" #-}

for instance, in Distribution.Setup.hs, I tried to add:

{-# DEPRECATED CopyPrefix "Don't use this." #-}

data CopyDest
  = NoCopyDest
  | CopyTo FilePath
  | CopyPrefix FilePath		-- DEPRECATED
  deriving (Eq, Show)

but got the error:

    Not in scope: type constructor or class `CopyPrefix'

Change History (6)

comment:1 Changed 12 years ago by simonmar

Component: DocumentationCompiler
Milestone: 6.4.2
severity: normalminor
Summary: pragma documentation unclear on where to put pragmasDEPRECATED doesn't work for data constructors

DEPRECATED can't be used for data constructors in 6.4.1. This has been fixed in the HEAD (see rev. 1.174 of RnSource.lhs, for example). We might be able to backport the fix; look at before 6.4.2 in any case.

comment:2 Changed 12 years ago by simonpj

Owner: set to simonpj

comment:3 Changed 12 years ago by simonmar

Resolution: fixed
Status: newclosed

It's quite a large patch, I'm punting on this for 6.4.2. 6.6 has it, anyway.

comment:4 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:5 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:6 Changed 8 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.