<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Dear GHC devs,<div><br></div><div>I’m trying to invoke the GHC.Core.Lint linting functions from a Core GHC plugin.</div><div>These functions take a <a id="t:LintConfig" class="def" style="color: rgb(0, 0, 0);">LintConfig that can m</a><a class="def" style="color: rgb(0, 0, 0);">ostly be constructed from DynFlags,</a></div><div><a class="def" style="color: rgb(0, 0, 0);">the exception being</a></div><div><a class="def" style="color: rgb(0, 0, 0);"><br></a></div><div><span><b><span class="Apple-tab-span" style="white-space:pre">   </span>l_vars :: ![Var]</b> — ^ Ids that should be treated as being in scope</span><div></div></div><div><span><br></span></div><div><span>My question is then “How can I get all variables in scope in the module underlying this CoreM computation, to pass in the LintConfig?”.</span></div><div><span><br></span></div><div><span>My ultimate goal is to run LintM to determine the usage environment of a given core expression.</span></div><div><span>In that sense, the “Id out of scope” errors aren’t that important to me, but they do make the linting action fail.</span></div><div><span><br></span></div><div><span>Thanks in advance!</span></div><div><span>Rodrigo</span></div></body></html>