Opened 6 years ago

Closed 6 years ago

#8340 closed feature request (fixed)

support for generating annotations from TH

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

Description

This patch adds support for template haskell generation of annotations. This is currently only possible directly via {-# ANN function "whatever annotation #-}.

The attached patch makes it possible to do the same from TH.

Module and type annotations are supported too.

This is part of a larger effort to make it possible to cross-module communicate between template haskell runs. See #7867 for a longer discussion.

Attachments (2)

th-8340.patch (3.1 KB) - added by errge 6 years ago.
template haskell side
ghc-8340.patch (890 bytes) - added by errge 6 years ago.
compiler side

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by errge

Attachment: th-8340.patch added

template haskell side

Changed 6 years ago by errge

Attachment: ghc-8340.patch added

compiler side

comment:1 Changed 6 years ago by errge

Status: newpatch

comment:2 Changed 6 years ago by Austin Seipp <austin@…>

In 627d1e008cbe4d9318b2466394420a968d1659da/ghc:

Add TH support for annotations (#8340)

Authored-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Austin Seipp <austin@well-typed.com>

comment:3 Changed 6 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged, thanks!

Note: See TracTickets for help on using tickets.