Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,274
    • Issues 4,274
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 412
    • Merge Requests 412
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3427

Closed
Open
Opened Aug 12, 2009 by Ian Lynagh <igloo@earth.li>@trac-igloo

control what sort of entity a deprecated pragma applies to

Originally reported as part of #3303 (closed).


It's annoying not being able to control whether a type or identically named constructor is being deprecated. Consider:

data Foo = Foo ...

This is a very common idiom. But now we want to switch to smart constructors

foo :: ... -> Foo

and eventually stop exporting the constructor Foo. But we cannot specify just the constructor, only both. According to the user guide the workaround would be to have a module that imports one but not the other, however while that's possible for the type it's not possible for the constructor.

How about

{-# DEPRECATED constructor Foo "use `foo' instead" #-}

and while we're at it, might as well have

{-# DEPRECATED type Foo "..." #-}

leaving the unqualified case meaning both as it does now.

Trac metadata
Trac field Value
Version 6.10.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
8.6.1
Milestone
8.6.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#3427