Hi, Am Dienstag, den 02.07.2013, 12:56 -0500 schrieb Nicolas Frisby:
> For my light experimentation, I have recovered these two values from
> the ModGuts that all plugins receive. Hopefully someone will shout out
> if there's pitfalls to avoid.
>
> * The mg_rdr_env field is of type GlobalRdrEnv.
strange, why did I miss that?
But I can’t get it to work, even looking up an element that I took from
the GRE itself returns []:
let e' = head (head (occEnvElts env))
putMsgS $ showSDoc dflags (ppr e')
putMsgS $ showSDoc dflags (ppr (lookupGRE_RdrName (nameRdrName (gre_name
e')) env))
prints:
GHC.NT.Type.NT
imported from `GHC.NT.Type' at GHC/NT.hs:5:1-18
(and originally defined at GHC/NT/Type.hs:6:6-7)
[]
Also, trying to construct a RdrName that I can look up fails:
let rdrName = mkRdrQual (mkModuleName "GHC.NT.Type") (mkTcOcc "NT")
putMsgS $ showSDoc dflags (ppr (lookupGRE_RdrName rdrName env))
prints also just [].
What am I doing wrong?
Thanks,
Joachim
--
Joachim “nomeata” Breitner
[email protected] • http://www.joachim-breitner.de/
Jabber: [email protected] • GPG-Key: 0x4743206C
Debian Developer: [email protected]
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
