diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2015-05-07 23:45:44 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2015-05-07 23:45:44 +0200 |
commit | 5bde9f7c1834ab4da1fad1838afec1a578c26530 (patch) | |
tree | e014b7efd23380e4d782817a9be818aff2f96475 /docs/backpack/algorithm.tex | |
parent | c3e6b3ac50e7cc061825d49d06fb4fc81e6d5bc1 (diff) | |
download | haskell-5bde9f7c1834ab4da1fad1838afec1a578c26530.tar.gz |
ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses
Summary:
The RdrHsSyn.isFunLhs function has the following
isFunLhs e = go e []
where
go (L loc (HsVar f)) es
| not (isRdrDataCon f) = return (Just (L loc f, False, es))
go (L _ (HsApp f e)) es = go f (e:es)
go (L _ (HsPar e)) es@(_:_) = go e es
The treatment of HsPar means that any parentheses around an infix function will be discarded.
e.g.
(f =*= g) sa i = f (toF sa i) =^= g (toG sa i)
will lose the ( before f and the closing one after g
Test Plan: ./validate
Reviewers: hvr, austin
Reviewed By: austin
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D832
GHC Trac Issues: #10269
Diffstat (limited to 'docs/backpack/algorithm.tex')
0 files changed, 0 insertions, 0 deletions