Opened 2 years ago

Last modified 2 years ago

#13551 new feature request

Support DEPRECATED and WARNING pragmas on Template Haskell

Reported by: utdemir Owned by:
Priority: low Milestone:
Component: Template Haskell Version: 8.0.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:


I'm writing TH function from some JSON spec to Haskell data structures. Some fields are marked as deprecated in the spec, therefore I want to mark the accessors to those fields with DEPRECATED pragma, but as far as I can see, TH does not support this.

I'm aware that module level DEPRECATED pragma is impossible in TH, but I still want to be able to tag top-level attributes as DEPRECATED.

Change History (2)

comment:1 Changed 2 years ago by utdemir

Just to have some fun, I will try to implement this myself. It will be the first time I'm trying to modify GHC and I am not sure if I will succeed, but I intend to send a patch within this week.

Last edited 2 years ago by utdemir (previous) (diff)

comment:2 Changed 2 years ago by bgamari

Yay, great! Let me know if you get stuck.

Note: See TracTickets for help on using tickets.