[GHC] #10486: Allow addTopDecls to create annotations
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.10.1 Component: Template | Operating System: Unknown/Multiple Haskell | Type of failure: None/Unknown Keywords: | Blocked By: Architecture: | Related Tickets: Unknown/Multiple | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Currently addTopDecls is [https://github.com/ghc/ghc/blob/228ddb95ee137e7cef02dcfe2521233892dd61e0/com... restricted] to creating function, value, and foreign import declarations. Lifting this restriction allows one to create annotations without any issues, as far as I can tell. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by gridaphobe): * cc: gridaphobe (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by spinda): I can submit a patch for this if the idea is okay. It's a very trivial change. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: spinda Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | testsuite/tests/annotations/should_compile/th/ Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1201 -------------------------------------+------------------------------------- Changes (by spinda): * owner: => spinda * testcase: => testsuite/tests/annotations/should_compile/th/ * differential: => Phab:D1201 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: spinda Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | testsuite/tests/annotations/should_compile/th/ Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1201 -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"ba5554ec2753cc41f5e087a91f23e1f612a9eb29/ghc" ba5554ec/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="ba5554ec2753cc41f5e087a91f23e1f612a9eb29" Allow annotations though addTopDecls (#10486) addTopDecls restricts what declarations it can be used to add. Adding annotations via this method works fine with no special changes apart from adding AnnD to the declaration whitelist. Test Plan: validate Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1201 GHC Trac Issues: #10486 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: spinda Type: feature request | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | testsuite/tests/annotations/should_compile/th/ Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1201 -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: spinda Type: feature request | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | testsuite/tests/annotations/should_compile/th/ Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1201 -------------------------------------+------------------------------------- Comment (by simonpj): Michael (@spinda), where in the user manual or TH library Haddock documentation is this change documented? Maybe the documentation of `addTopDecls` is lacking... if so, might you add some? Thanks! Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10486: Allow addTopDecls to create annotations -------------------------------------+------------------------------------- Reporter: spinda | Owner: spinda Type: feature request | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | testsuite/tests/annotations/should_compile/th/ Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1201 -------------------------------------+------------------------------------- Comment (by goldfire): See #10853, a new ticket meant to track general improvements to `addTopDecls`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10486#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC