
#10823: Don't mark functions with annotations as dead -------------------------------------+------------------------------------- Reporter: spinda | Owner: Type: feature request | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by spinda): It would be nice if you could just refer to gt-the-value from an annotation on ok to keep gt live (because ok is live), but I don't understand annotations enough to know whether that works or could work. I think it could, but annotation payloads (including names within them) are just arbitrary values, so this would require walking the tree of the data and trying to pull out uses of TH's {{{Name}}} constructor. That might get hairy. I don't really understand why "Don't mark functions with annotations as dead" is sensible behavior, given the totally general-purpose nature of annotations. You're right, this wouldn't necessarily make sense for all annotations. In the end, I think the trick suggested by goldfire would be fine for LiquidHaskell's particular use case, since it builds on language behavior that won't likely change soon. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10823#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler