Do not imply NoStarIsType by TypeOperators/TypeInType
authorVladislav Zavialov <vlad.z.4096@gmail.com>
Mon, 16 Jul 2018 22:46:52 +0000 (18:46 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 16 Jul 2018 23:32:35 +0000 (19:32 -0400)
commitbb5aa616905727a7c73bc323164d6812e093c2dc
tree7d30cfec301bd73c2021c2705a4182320a592ec7
parentc67744211ada6479e0f9d5ca4188a08cd36d6919
Do not imply NoStarIsType by TypeOperators/TypeInType

Implementation of the "Embrace TypeInType" proposal was done according
to the spec, which specified that TypeOperators must imply NoStarIsType.
This implication was meant to prevent breakage and to be removed in 2
releases.  However, compiling head.hackage has shown that this
implication only magnified the breakage, so there is no reason to have
it in the first place.

To remain in compliance with the three-release policy, we add a
workaround to define the (*) type operator even when -XStarIsType is on.

Test Plan: ./validate

Reviewers: bgamari, RyanGlScott, goldfire, phadej, hvr

Reviewed By: bgamari, RyanGlScott

Subscribers: harpocrates, rwbarton, thomie, carter

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

(cherry picked from commit 65c186f0fdde95fd7c63ab9bd9b33a0213dba7d1)
21 files changed:
compiler/basicTypes/RdrName.hs
compiler/main/DynFlags.hs
compiler/parser/Lexer.x
compiler/parser/RdrHsSyn.hs
compiler/rename/RnEnv.hs
docs/users_guide/8.6.1-notes.rst
docs/users_guide/glasgow_exts.rst
docs/users_guide/using-warnings.rst
libraries/base/GHC/TypeNats.hs
testsuite/tests/dependent/ghci/T14238.stdout
testsuite/tests/partial-sigs/should_compile/T15039b.stderr
testsuite/tests/partial-sigs/should_compile/T15039d.stderr
testsuite/tests/polykinds/T10134.hs
testsuite/tests/th/TH_unresolvedInfix.hs
testsuite/tests/th/TH_unresolvedInfix_Lib.hs
testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs
testsuite/tests/typecheck/should_run/TcTypeNatSimpleRun.hs
testsuite/tests/warnings/should_compile/StarBinder.hs [new file with mode: 0644]
testsuite/tests/warnings/should_compile/StarBinder.stderr [new file with mode: 0644]
testsuite/tests/warnings/should_compile/all.T