[GHC] #9946: Expose the source location of template-haskell Names
GHC
ghc-devs at haskell.org
Wed Dec 31 22:21:00 UTC 2014
#9946: Expose the source location of template-haskell Names
-------------------------------------+-------------------------------------
Reporter: gridaphobe | Owner:
Type: feature | Status: new
request | Milestone:
Priority: low | Version: 7.11
Component: Compiler | Operating System: Unknown/Multiple
Keywords: | Type of failure: None/Unknown
Architecture: | Blocked By:
Unknown/Multiple | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
I've often wanted to know where a particular `Name` is defined
(specifically the filepath), but as far as I can tell, template-haskell
doesn't currently support this. It'd be really nice to have a function
{{{#!hs
nameLoc :: Name -> Loc
}}}
to expose the definition site of the `Name`.
I think this should be fairly straightforward to add since GHC carries the
definition site around with its `Name`s, but I've never looked at the TH
internals.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9946>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list