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 22:46:53 +0000 (18:46 -0400)
commit65c186f0fdde95fd7c63ab9bd9b33a0213dba7d1
tree92abe9e3aeab1711db0e77361c453ee49f48ef55
parent7fe4993673e43e5b21f38d79ecc8b5163e97ee84
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
22 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/partial-sigs/should_fail/T14584.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