Safe Haskell | None |
---|---|
Language | Haskell98 |
NotCPP.LookupValueName
Description
This module uses scope lookup techniques to either export
lookupValueName
from Language.Haskell.TH
, or define
its own lookupValueName
, which attempts to do the
same job with just reify
. This will sometimes fail, but if it
succeeds it will give the answer that the real function would have
given.
The idea is that if you use lookupValueName from this module,
your client code will automatically use the best available name
lookup mechanism. This means that e.g. scopeLookup
can work
very well on recent GHCs and less well but still somewhat
usefully on older GHCs.
- lookupValueName :: String -> Q (Maybe Name)
Documentation
lookupValueName :: String -> Q (Maybe Name)
Look up the given name in the (value namespace of the) current splice's scope. See Language.Haskell.TH.Syntax for more details.