[GHC] #9699: TH function to list names in scope
GHC
ghc-devs at haskell.org
Thu Oct 16 16:35:52 UTC 2014
#9699: TH function to list names in scope
-------------------------------------+-------------------------------------
Reporter: MikeIzbicki | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 7.8.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
I [asked about this on
stackoverflow](http://stackoverflow.com/questions/26394199/using-
templatehaskell-to-list-all-names-in-a-namespace), and apparently it
doesn't exist yet.
I want a TemplateHaskell function `variablesInScope :: Q [Name]` that
returns a list of the `Name`'s of all the variables in scope.
TemplateHaskell obviously has this information available in order to
implement functions like `reify :: Name -> Q Info` and `lookupValueName ::
String -> Q (Maybe Name)`. So it seems like this might be a pretty simple
function to add.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9699>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list