diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2017-01-08 07:52:53 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2017-01-08 07:53:06 +0300 |
commit | 6c869f906b879bc746ea1aa3e79e02f146d85093 (patch) | |
tree | afbb8f916c28cbeced7e3c29dcf1e44a8c47096c /compiler/hsSyn/HsExpr.hs | |
parent | 7b317effd59f56bc8450ea8efbb1ef5954f09e5d (diff) | |
download | haskell-6c869f906b879bc746ea1aa3e79e02f146d85093.tar.gz |
Parse holes as infix operators
Reported as #13050. Since holes are expressions but not identifiers,
holes were not allowed in infix operator position. This patch introduces
a new production in infix operator parser to allow this.
Reviewers: simonpj, austin, bgamari
Reviewed By: simonpj
Subscribers: simonpj, RyanGlScott, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2910
GHC Trac Issues: #13050
Diffstat (limited to 'compiler/hsSyn/HsExpr.hs')
-rw-r--r-- | compiler/hsSyn/HsExpr.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs index 1b6ccdc1d8..18bf54aebc 100644 --- a/compiler/hsSyn/HsExpr.hs +++ b/compiler/hsSyn/HsExpr.hs @@ -823,6 +823,7 @@ ppr_expr (OpApp e1 op _ e2) = case unLoc op of HsVar (L _ v) -> pp_infixly v HsRecFld f -> pp_infixly f + HsUnboundVar h@TrueExprHole{} -> pp_infixly (unboundVarOcc h) _ -> pp_prefixly where pp_e1 = pprDebugParendExpr e1 -- In debug mode, add parens |