Add UInfixT to TH types (fixes #10522)
authorMichael Smith <michael@diglumi.com>
Mon, 27 Jul 2015 11:19:01 +0000 (13:19 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 27 Jul 2015 11:50:10 +0000 (13:50 +0200)
commit217827393dcacd0ef696c4f9f6136e21b3be63a8
tree39198ec8909613c911b633b05a6ce4f8de0b9e06
parentf842ad6c751c14ec331ca1709538c2f3e9a30ae7
Add UInfixT to TH types (fixes #10522)

UInfixT is like UInfixE or UInfixP but for types. Template Haskell
splices can use it to punt fixity handling to GHC when constructing
types.

UInfixT is converted in compiler/hsSyn/Convert to a right-biased tree of
HsOpTy, which is already rearranged in compiler/rename/RnTypes to match
operator fixities.

This patch consists of (1) adding UInfixT to the AST, (2) implementing
the conversion and updating relevant comments, (3) updating
pretty-printing and library support, and (4) adding tests.

Test Plan: validate

Reviewers: austin, goldfire, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1088

GHC Trac Issues: #10522
compiler/hsSyn/Convert.hs
docs/users_guide/7.12.1-notes.xml
libraries/template-haskell/Language/Haskell/TH.hs
libraries/template-haskell/Language/Haskell/TH/Lib.hs
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
testsuite/tests/th/TH_unresolvedInfix.hs
testsuite/tests/th/TH_unresolvedInfix.stdout
testsuite/tests/th/TH_unresolvedInfix_Lib.hs