Visible kind application
authormynguyen <mnguyen1@brynmawr.edu>
Tue, 18 Dec 2018 16:52:26 +0000 (11:52 -0500)
committerRichard Eisenberg <rae@cs.brynmawr.edu>
Thu, 3 Jan 2019 13:57:32 +0000 (08:57 -0500)
commit17bd163566153babbf51adaff8397f948ae363ca
treeef25e933481def276de4cdcad77eb4a34a76444b
parent6e4e63764aaf558cf177c2a9c2da345b2a360ea6
Visible kind application

Summary:
This patch implements visible kind application (GHC Proposal 15/#12045), as well as #15360 and #15362.
It also refactors unnamed wildcard handling, and requires that type equations in type families in Template Haskell be
written with full type on lhs. PartialTypeSignatures are on and warnings are off automatically with visible kind
application, just like in term-level.

There are a few remaining issues with this patch, as documented in
ticket #16082.

Includes a submodule update for Haddock.

Test Plan: Tests T12045a/b/c/TH1/TH2, T15362, T15592a

Reviewers: simonpj, goldfire, bgamari, alanz, RyanGlScott, Iceland_jack

Subscribers: ningning, Iceland_jack, RyanGlScott, int-index, rwbarton, mpickering, carter

GHC Trac Issues: `#12045`, `#15362`, `#15592`, `#15788`, `#15793`, `#15795`, `#15797`, `#15799`, `#15801`, `#15807`, `#15816`

Differential Revision: https://phabricator.haskell.org/D5229
141 files changed:
compiler/deSugar/DsMeta.hs
compiler/hieFile/HieAst.hs
compiler/hsSyn/Convert.hs
compiler/hsSyn/HsBinds.hs
compiler/hsSyn/HsDecls.hs
compiler/hsSyn/HsExtension.hs
compiler/hsSyn/HsInstances.hs
compiler/hsSyn/HsTypes.hs
compiler/hsSyn/HsUtils.hs
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
compiler/prelude/THNames.hs
compiler/rename/RnSource.hs
compiler/rename/RnTypes.hs
compiler/typecheck/TcDeriv.hs
compiler/typecheck/TcExpr.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcSigs.hs
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcSplice.hs
compiler/typecheck/TcTyClsDecls.hs
compiler/types/TyCoRep.hs
docs/users_guide/glasgow_exts.rst
libraries/template-haskell/Language/Haskell/TH/Lib.hs
libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
libraries/template-haskell/changelog.md
testsuite/tests/dependent/should_compile/T11241.stderr
testsuite/tests/deriving/should_compile/T14579a.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/all.T
testsuite/tests/ghci/scripts/T12447.stdout
testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr
testsuite/tests/parser/should_compile/DumpParsedAst.hs
testsuite/tests/parser/should_compile/DumpParsedAst.stderr
testsuite/tests/parser/should_compile/DumpRenamedAst.hs
testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
testsuite/tests/parser/should_compile/DumpTypecheckedAst.hs
testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
testsuite/tests/parser/should_compile/KindSigs.stderr
testsuite/tests/parser/should_compile/T12045e.hs [new file with mode: 0644]
testsuite/tests/parser/should_compile/all.T
testsuite/tests/parser/should_fail/T12045d.hs [new file with mode: 0644]
testsuite/tests/parser/should_fail/T12045d.stderr [new file with mode: 0644]
testsuite/tests/parser/should_fail/all.T
testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.stderr
testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
testsuite/tests/partial-sigs/should_compile/Either.stderr
testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr
testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr
testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
testsuite/tests/partial-sigs/should_compile/SuperCls.stderr
testsuite/tests/partial-sigs/should_compile/T10403.stderr
testsuite/tests/partial-sigs/should_compile/T10438.stderr
testsuite/tests/partial-sigs/should_compile/T10519.stderr
testsuite/tests/partial-sigs/should_compile/T11016.stderr
testsuite/tests/partial-sigs/should_compile/T11339a.stderr
testsuite/tests/partial-sigs/should_compile/T11670.stderr
testsuite/tests/partial-sigs/should_compile/T12844.stderr
testsuite/tests/partial-sigs/should_compile/T12845.stderr
testsuite/tests/partial-sigs/should_compile/T13482.stderr
testsuite/tests/partial-sigs/should_compile/T14217.stderr
testsuite/tests/partial-sigs/should_compile/T14643.stderr
testsuite/tests/partial-sigs/should_compile/T14643a.stderr
testsuite/tests/partial-sigs/should_compile/T14715.stderr
testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr
testsuite/tests/partial-sigs/should_compile/Uncurry.stderr
testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
testsuite/tests/partial-sigs/should_fail/PatBind3.stderr
testsuite/tests/partial-sigs/should_fail/T10615.stderr
testsuite/tests/partial-sigs/should_fail/T10999.stderr
testsuite/tests/partial-sigs/should_fail/T11122.stderr
testsuite/tests/partial-sigs/should_fail/T11515.stderr
testsuite/tests/partial-sigs/should_fail/T11976.stderr
testsuite/tests/partial-sigs/should_fail/T12634.stderr
testsuite/tests/partial-sigs/should_fail/T14040a.stderr
testsuite/tests/partial-sigs/should_fail/T14584.stderr
testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr
testsuite/tests/partial-sigs/should_run/T15415.stderr
testsuite/tests/partial-sigs/should_run/T15415.stdout
testsuite/tests/perf/compiler/T13035.stderr
testsuite/tests/polykinds/T14172.stderr
testsuite/tests/polykinds/T14265.stderr
testsuite/tests/th/ClosedFam2TH.hs
testsuite/tests/th/T12045TH1.hs [new file with mode: 0644]
testsuite/tests/th/T12045TH1.stderr [new file with mode: 0644]
testsuite/tests/th/T12045TH2.hs [new file with mode: 0644]
testsuite/tests/th/T12045TH2.stderr [new file with mode: 0644]
testsuite/tests/th/T12503.hs
testsuite/tests/th/T13618.hs
testsuite/tests/th/T15360b.stderr
testsuite/tests/th/T15362.hs [new file with mode: 0644]
testsuite/tests/th/T15362.stderr [new file with mode: 0644]
testsuite/tests/th/T5886a.hs
testsuite/tests/th/T6018th.hs
testsuite/tests/th/T6018th.stderr
testsuite/tests/th/T7532a.hs
testsuite/tests/th/T8884.hs
testsuite/tests/th/TH_TyInstWhere2.hs
testsuite/tests/th/TH_TyInstWhere2.stderr
testsuite/tests/th/TH_reifyDecl1.hs
testsuite/tests/th/TH_reifyDecl1.stderr
testsuite/tests/th/all.T
testsuite/tests/typecheck/should_compile/T10072.stderr
testsuite/tests/typecheck/should_compile/T12045a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T14366.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T15788.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T15793.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T15807a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T
testsuite/tests/typecheck/should_fail/T12045b.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12045b.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12045c.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12045c.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T13819.stderr
testsuite/tests/typecheck/should_fail/T15592a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15592a.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15797.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15797.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15799.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15799.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15801.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15801.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15807.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15807.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15816.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15816.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T
utils/haddock