Add Fixity info for infix types
authorRyanGlScott <ryan.gl.scott@gmail.com>
Wed, 5 Aug 2015 12:24:08 +0000 (14:24 +0200)
committerBen Gamari <ben@smart-cactus.org>
Wed, 5 Aug 2015 12:45:16 +0000 (14:45 +0200)
commit575abf42e218925e456bf765abb14f069ac048a0
treedee6b8678c3c08ba80d711483f6ff0ee1c5502ca
parentfd6b24f1ef8ff26c97cb7e48bad8645cc63d2001
Add Fixity info for infix types

Template Haskell allows reification of fixity for infix functions and
data constructors, and not for infix types. This adds a `Fixity` field
to the relevant `Info` constructors that can have infix types (`ClassI`,
`TyConI`, and `FamilyI`).

I don't think that `VarI` or `PrimTyConI` can be infix, but I could be
wrong.

Test Plan: ./validate

Reviewers: austin, goldfire, bgamari

Reviewed By: goldfire, bgamari

Subscribers: thomie

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

GHC Trac Issues: #10704
15 files changed:
compiler/typecheck/TcSplice.hs
docs/users_guide/7.12.1-notes.xml
libraries/template-haskell/Language/Haskell/TH.hs
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
testsuite/tests/th/T10704.hs [new file with mode: 0644]
testsuite/tests/th/T10704.stdout [new file with mode: 0644]
testsuite/tests/th/T10704a.hs [new file with mode: 0644]
testsuite/tests/th/T1849.script
testsuite/tests/th/T2222.hs
testsuite/tests/th/T5358.hs
testsuite/tests/th/T5358.stderr
testsuite/tests/th/TH_reifyDecl1.hs
testsuite/tests/th/TH_reifyDecl1.stderr
testsuite/tests/th/all.T