<div dir="ltr"><div>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><br></div><div>I've also submitted the fix to Phab, over here: <a href="https://phabricator.haskell.org/D4822">https://phabricator.haskell.org/D4822</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 June 2018 at 09:04, Richard Eisenberg <span dir="ltr"><<a href="mailto:rae@cs.brynmawr.edu" target="_blank">rae@cs.brynmawr.edu</a>></span> wrote:<br><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">This looks pretty good to me. What's "in progress" about it?<div><br></div><div>I would want to see a comment on the declaration for HsArgPar with an example, and a test case.</div><div><br></div><div>Thanks!</div><div>Richard<br><div><br><blockquote type="cite"><div><div class="h5"><div>On Jun 7, 2018, at 6:38 AM, Zubin Duggal <<a href="mailto:zubin.duggal@gmail.com" target="_blank">zubin.duggal@gmail.com</a>> wrote:</div><br class="m_3937939292121015663Apple-interchange-newline"></div></div><div><div><div class="h5"><div dir="ltr"><div>Hello all,</div><div><br></div><div>The typechecker doesn't preserve parenthesis that occur at the head of applications.<br><br>This results in some weird SrcSpans in the TypecheckedSource<br><br>For example, given code<br><br>foo a b c = (bar a) b c<br><br>The typechecker will emit an HsApp with head spanning over `bar a) b` and tail spanning over `c`.<br>Notice that the opening parenthesis is not included.<br><br>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><br>This occurs due to this line in TcExpr.hs<br><br>tcApp m_herald (L _ (HsPar _ fun)) args res_ty<br> = tcApp m_herald fun args res_ty<br><br>I have a work in progress fix here: <a href="https://github.com/wz1000/ghc/commit/3b6db5a35dc8677a7187e349a85ffd51f452452a" target="_blank">https://github.com/wz1000/ghc/<wbr>commit/<wbr>3b6db5a35dc8677a7187e349a85ffd<wbr>51f452452a</a></div><div><br></div><div>I have also created a ticket on trac: <a href="https://ghc.haskell.org/trac/ghc/ticket/15242#ticket" target="_blank">https://ghc.haskell.org/trac/<wbr>ghc/ticket/15242#ticket</a><br></div></div></div></div>
______________________________<wbr>_________________<br>ghc-devs mailing list<br><a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/ghc-devs</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div>