Dear GHC developers

Could you please look at #23447 Where should "tokens" live
<https://gitlab.haskell.org/ghc/ghc/-/issues/23447>?

In brief, the question is whether we want to have:

data HsExpr p = ....
   | HsLet (XLet p) (HsLocalBinds p) (LHsExpr p)
or

data HsExpr p = ....
   | HsLet (XLet p) (HsToken "let" p)
           (HsLocalBinds p) (HsToken "in" p) (LHsExpr p)


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 *every* syntax tree.

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.

Comments with specific use-cases and examples would be particularly helpful.

Thanks!

Simon
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to