Skip to content

TH function to list names in scope

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.

Trac metadata
Trac field Value
Version 7.8.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information