Re: initIface* usage in plugins
Hi Ben, Yes, I have a solution. For reference, I was unaware that method instances are named with local variables in expression ASTs, while instances and other top-level bindings are - so the solution is to add those Ids to the environment before loading the expression, which isn’t necessary for other top-level bindings that are sourced from the CgGuts cg_binds. Cheers, Josh > > On Feb 27, 2021 at 7:34 am, mailto:b...@smart-cactus.org)> > wrote: > > > Josh Meredith writes: > Hi, > I'm trying to use initIfaceLoad and > initIfaceLcl to lookup core `Name`s > within a plugin. My understanding is > that functions such as > `lookupIfaceTop` are used for this, but I'm > running into an issue that I > suspect is caused by some `Name`s being > inappropriate for this function, so > they fail with the error `Iface id > out of scope: ...`. > > Is there a robust way to select which `Name` > lookup function to use based > on a core binding/expression? > Josh, did > you ever get an answer here? Cheers, - Ben > ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Re: initIface* usage in plugins
Josh Meredith writes: > Hi, > I'm trying to use initIfaceLoad and initIfaceLcl to lookup core `Name`s > within a plugin. My understanding is that functions such as > `lookupIfaceTop` are used for this, but I'm running into an issue that I > suspect is caused by some `Name`s being inappropriate for this function, so > they fail with the error `Iface id out of scope: ...`. > > Is there a robust way to select which `Name` lookup function to use based > on a core binding/expression? > Josh, did you ever get an answer here? Cheers, - Ben signature.asc Description: PGP signature ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
initIface* usage in plugins
Hi, I'm trying to use initIfaceLoad and initIfaceLcl to lookup core `Name`s within a plugin. My understanding is that functions such as `lookupIfaceTop` are used for this, but I'm running into an issue that I suspect is caused by some `Name`s being inappropriate for this function, so they fail with the error `Iface id out of scope: ...`. Is there a robust way to select which `Name` lookup function to use based on a core binding/expression? Thanks, Josh ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs