Implement Partial Type Signatures
authorThomas Winant <thomas.winant@cs.kuleuven.be>
Fri, 28 Nov 2014 22:08:10 +0000 (16:08 -0600)
committerAustin Seipp <austin@well-typed.com>
Fri, 28 Nov 2014 23:17:17 +0000 (17:17 -0600)
commitd831b6f41b3b89dc4a643069d5668c05a20f3c37
tree4f717db36c841619324cd210b9146ed8db671869
parent7460dafae3709218af651cb8bc47b5f03d4c25c7
Implement Partial Type Signatures

Summary:
Add support for Partial Type Signatures, i.e. holes in types, see:
https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures

This requires an update to the Haddock submodule.

Test Plan: validate

Reviewers: austin, goldfire, simonpj

Reviewed By: simonpj

Subscribers: thomie, Iceland_jack, dominique.devriese, simonmar, carter, goldfire

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

GHC Trac Issues: #9478
219 files changed:
compiler/deSugar/DsMeta.hs
compiler/hsSyn/Convert.lhs
compiler/hsSyn/HsBinds.lhs
compiler/hsSyn/HsExpr.lhs
compiler/hsSyn/HsTypes.lhs
compiler/hsSyn/HsUtils.lhs
compiler/main/DynFlags.hs
compiler/main/ErrUtils.lhs
compiler/main/HscStats.hs
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
compiler/rename/RnBinds.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnNames.lhs
compiler/rename/RnSource.lhs
compiler/rename/RnTypes.lhs
compiler/typecheck/TcBinds.lhs
compiler/typecheck/TcCanonical.lhs
compiler/typecheck/TcClassDcl.lhs
compiler/typecheck/TcEnv.lhs
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcExpr.lhs
compiler/typecheck/TcGenDeriv.lhs
compiler/typecheck/TcHsSyn.lhs
compiler/typecheck/TcHsType.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcPat.lhs
compiler/typecheck/TcPatSyn.lhs
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcRnMonad.lhs
compiler/typecheck/TcRnTypes.lhs
compiler/typecheck/TcRules.lhs
compiler/typecheck/TcSMonad.lhs
compiler/typecheck/TcTyClsDecls.lhs
compiler/typecheck/TcType.lhs
compiler/typecheck/TcValidity.lhs
compiler/types/Type.lhs
compiler/types/TypeRep.lhs
docs/users_guide/flags.xml
docs/users_guide/glasgow_exts.xml
docs/users_guide/using.xml
testsuite/tests/driver/T4437.hs
testsuite/tests/partial-sigs/Makefile [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ADT.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ADT.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr3.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr3.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr4.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr4.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr5.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr5.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr6.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/AddAndOr6.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/BoolToBool.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/BoolToBool.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Defaulting1MROn.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Defaulting1MROn.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Either.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Either.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/EqualityConstraint.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/EqualityConstraint.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Every.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Every.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/EveryNamed.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExpressionSig.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExpressionSig.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExpressionSigNamed.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExpressionSigNamed.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraConstraints2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraConstraints2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraNumAMROff.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraNumAMROff.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraNumAMROn.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ExtraNumAMROn.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Forall1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Forall1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/GenNamed.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/GenNamed.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/HigherRank1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/HigherRank1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/HigherRank2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/HigherRank2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/LocalDefinitionBug.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/LocalDefinitionBug.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Makefile [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Meltdown.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Meltdown.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/MonoLocalBinds.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/MonoLocalBinds.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/NamedTyVar.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/NamedTyVar.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ParensAroundContext.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ParensAroundContext.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/PatBind.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/PatBind.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/PatBind2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/PatBind2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/PatternSig.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/PatternSig.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Recursive.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Recursive.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcards.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcards.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcardsGood.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcardsGood.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ShowNamed.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/ShowNamed.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/SimpleGen.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/SkipMany.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/SkipMany.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Uncurry.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/Uncurry.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/UncurryNamed.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/all.T [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/AnnotatedConstraintNotForgotten.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/AnnotatedConstraintNotForgotten.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/Forall1Bad.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/Forall1Bad.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/Makefile [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ScopedNamedWildcardsBad.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/ScopedNamedWildcardsBad.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/TidyClash.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/TidyClash.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/TidyClash2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADT1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADT2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADT3.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInDefault.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceLHS.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceLHS.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymLHS.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymLHS.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_fail/all.T [new file with mode: 0644]
utils/haddock