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, <Ben Gamari (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