Opened 8 years ago

Closed 8 years ago

Last modified 4 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: Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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:

./Distribution/Setup.hs:172:15:
    Not in scope: type constructor or class `CopyPrefix'

Change History (6)

comment:1 Changed 8 years ago by simonmar

  • Component changed from Documentation to Compiler
  • Milestone set to 6.4.2
  • severity changed from normal to minor
  • Summary changed from pragma documentation unclear on where to put pragmas to DEPRECATED 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 8 years ago by simonpj

  • Owner set to simonpj

comment:3 Changed 8 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:4 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:5 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:6 Changed 4 years ago by simonmar

  • Difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.