<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Dear GHC developers</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Could you please look at <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/23447">#23447 Where should "tokens" live</a>?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">In brief, the question is whether we want to have:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;margin-left:40px"><span style="font-family:monospace">data HsExpr p = ....</span></div><div class="gmail_default" style="font-family:tahoma,sans-serif;margin-left:40px"><span style="font-family:monospace"> | HsLet (XLet p) (HsLocalBinds p) (LHsExpr p)</span></div><div class="gmail_default" style="font-family:tahoma,sans-serif"></div><div class="gmail_default" style="font-family:tahoma,sans-serif">or</div><div class="gmail_default" style="font-family:tahoma,sans-serif"></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;margin-left:40px"><span style="font-family:monospace">data HsExpr p = ....</span></div><div class="gmail_default" style="font-family:tahoma,sans-serif;margin-left:40px"><span style="font-family:monospace"> | HsLet (XLet p) (HsToken "let" p) </span></div><div class="gmail_default" style="font-family:tahoma,sans-serif;margin-left:40px"><span style="font-family:monospace"> (HsLocalBinds p) (HsToken "in" p) (LHsExpr p)</span></div>
</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">In the former, if a client wants HsTokes to track the precise source locations of the "let" and "in" keywords, they'd have to put it in the TTG extension field; in the latter, this information is in <i>every</i> syntax tree.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">At the moment we have some of each, which is not satisfactory. We need to decide a policy and stick to it. If you use HsSyn, HsExpr, HsPat etc, in any way, you should have an opinion. Please do express it. At the moment we have only a few voices so we risk deciding without enough evidence and use-cases.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Comments with specific use-cases and examples would be particularly helpful.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks!</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Simon<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div>