<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Great -- and glad to see this getting appropriate attention over there.<div class=""><br class=""></div><div class="">Richard<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 11, 2018, at 11:51 PM, Zubin Duggal <<a href="mailto:zubin.duggal@gmail.com" class="">zubin.duggal@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">At the time I hadn't modified tcSeq and tcTagToEnum to take HsArgPars into account. I have now done that, and also added a test case.</div><div class=""><br class=""></div><div class="">I've also submitted the fix to Phab, over here: <a href="https://phabricator.haskell.org/D4822" class="">https://phabricator.haskell.org/D4822</a><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 12 June 2018 at 09:04, Richard Eisenberg <span dir="ltr" class=""><<a href="mailto:rae@cs.brynmawr.edu" target="_blank" class="">rae@cs.brynmawr.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">This looks pretty good to me. What's "in progress" about it?<div class=""><br class=""></div><div class="">I would want to see a comment on the declaration for HsArgPar with an example, and a test case.</div><div class=""><br class=""></div><div class="">Thanks!</div><div class="">Richard<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Jun 7, 2018, at 6:38 AM, Zubin Duggal <<a href="mailto:zubin.duggal@gmail.com" target="_blank" class="">zubin.duggal@gmail.com</a>> wrote:</div><br class="m_3937939292121015663Apple-interchange-newline"></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class=""><div class="">Hello all,</div><div class=""><br class=""></div><div class="">The typechecker doesn't preserve parenthesis that occur at the head of applications.<br class=""><br class="">This results in some weird SrcSpans in the TypecheckedSource<br class=""><br class="">For example, given code<br class=""><br class="">foo a b c = (bar a) b c<br class=""><br class="">The typechecker will emit an HsApp with head spanning over `bar a) b` and tail spanning over `c`.<br class="">Notice that the opening parenthesis is not included.<br class=""><br class="">On the other hand, the renamer will generate the expected SrcSpans that always include both parenthesis, or neither. This becomes an issue when you want to associate RenamedSource with its corresponding TypecheckedSource, as the SrcSpans no longer match and overlap partially.<br class=""><br class="">This occurs due to this line in TcExpr.hs<br class=""><br class="">tcApp m_herald (L _ (HsPar _ fun)) args res_ty<br class=""> = tcApp m_herald fun args res_ty<br class=""><br class="">I have a work in progress fix here: <a href="https://github.com/wz1000/ghc/commit/3b6db5a35dc8677a7187e349a85ffd51f452452a" target="_blank" class="">https://github.com/wz1000/ghc/<wbr class="">commit/<wbr class="">3b6db5a35dc8677a7187e349a85ffd<wbr class="">51f452452a</a></div><div class=""><br class=""></div><div class="">I have also created a ticket on trac: <a href="https://ghc.haskell.org/trac/ghc/ticket/15242#ticket" target="_blank" class="">https://ghc.haskell.org/trac/<wbr class="">ghc/ticket/15242#ticket</a><br class=""></div></div></div></div>
______________________________<wbr class="">_________________<br class="">ghc-devs mailing list<br class=""><a href="mailto:ghc-devs@haskell.org" target="_blank" class="">ghc-devs@haskell.org</a><br class=""><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank" class="">http://mail.haskell.org/cgi-<wbr class="">bin/mailman/listinfo/ghc-devs</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>