[commit: ghc] master: Implement Partial Type Signatures (d831b6f)

git at git.haskell.org git at git.haskell.org
Fri Nov 28 23:17:21 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d831b6f41b3b89dc4a643069d5668c05a20f3c37/ghc

>---------------------------------------------------------------

commit d831b6f41b3b89dc4a643069d5668c05a20f3c37
Author: Thomas Winant <thomas.winant at cs.kuleuven.be>
Date:   Fri Nov 28 16:08:10 2014 -0600

    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


>---------------------------------------------------------------

d831b6f41b3b89dc4a643069d5668c05a20f3c37
 compiler/deSugar/DsMeta.hs                         |  10 +-
 compiler/hsSyn/Convert.lhs                         |   4 +-
 compiler/hsSyn/HsBinds.lhs                         |  13 +-
 compiler/hsSyn/HsExpr.lhs                          |   6 +-
 compiler/hsSyn/HsTypes.lhs                         |  89 ++++-
 compiler/hsSyn/HsUtils.lhs                         |   2 +-
 compiler/main/DynFlags.hs                          |   7 +
 compiler/main/ErrUtils.lhs                         |   6 +-
 compiler/main/HscStats.hs                          |   2 +-
 compiler/parser/Parser.y                           |  48 ++-
 compiler/parser/RdrHsSyn.hs                        | 308 +++++++++++++++-
 compiler/rename/RnBinds.lhs                        |  24 +-
 compiler/rename/RnExpr.lhs                         |  10 +-
 compiler/rename/RnNames.lhs                        |   2 +-
 compiler/rename/RnSource.lhs                       |   5 +-
 compiler/rename/RnTypes.lhs                        | 107 +++++-
 compiler/typecheck/TcBinds.lhs                     | 161 ++++++--
 compiler/typecheck/TcCanonical.lhs                 |  12 +-
 compiler/typecheck/TcClassDcl.lhs                  |   6 +-
 compiler/typecheck/TcEnv.lhs                       |  37 +-
 compiler/typecheck/TcErrors.lhs                    |  47 ++-
 compiler/typecheck/TcExpr.lhs                      |  14 +-
 compiler/typecheck/TcGenDeriv.lhs                  |  13 +-
 compiler/typecheck/TcHsSyn.lhs                     |   2 +-
 compiler/typecheck/TcHsType.lhs                    |  37 +-
 compiler/typecheck/TcInstDcls.lhs                  |   6 +-
 compiler/typecheck/TcMType.lhs                     |  68 +++-
 compiler/typecheck/TcPat.lhs                       |  27 +-
 compiler/typecheck/TcPatSyn.lhs                    |   7 +-
 compiler/typecheck/TcRnDriver.lhs                  |   4 +-
 compiler/typecheck/TcRnMonad.lhs                   |  19 +
 compiler/typecheck/TcRnTypes.lhs                   |  27 +-
 compiler/typecheck/TcRules.lhs                     |   2 +-
 compiler/typecheck/TcSMonad.lhs                    |   2 +-
 compiler/typecheck/TcTyClsDecls.lhs                |   2 +-
 compiler/typecheck/TcType.lhs                      |  17 +-
 compiler/typecheck/TcValidity.lhs                  |   4 +-
 compiler/types/Type.lhs                            |   7 +-
 compiler/types/TypeRep.lhs                         |  25 +-
 docs/users_guide/flags.xml                         |  25 ++
 docs/users_guide/glasgow_exts.xml                  | 287 +++++++++++++++
 docs/users_guide/using.xml                         |  18 +
 testsuite/tests/driver/T4437.hs                    |   4 +-
 .../tests/{annotations => partial-sigs}/Makefile   |   0
 testsuite/tests/partial-sigs/should_compile/ADT.hs |   7 +
 .../tests/partial-sigs/should_compile/ADT.stderr   |   9 +
 .../tests/partial-sigs/should_compile/AddAndOr1.hs |   7 +
 .../partial-sigs/should_compile/AddAndOr1.stderr   |   7 +
 .../tests/partial-sigs/should_compile/AddAndOr2.hs |   7 +
 .../partial-sigs/should_compile/AddAndOr2.stderr   |   7 +
 .../tests/partial-sigs/should_compile/AddAndOr3.hs |   7 +
 .../partial-sigs/should_compile/AddAndOr3.stderr   |   7 +
 .../tests/partial-sigs/should_compile/AddAndOr4.hs |   7 +
 .../partial-sigs/should_compile/AddAndOr4.stderr   |   7 +
 .../tests/partial-sigs/should_compile/AddAndOr5.hs |   7 +
 .../partial-sigs/should_compile/AddAndOr5.stderr   |   7 +
 .../tests/partial-sigs/should_compile/AddAndOr6.hs |   7 +
 .../partial-sigs/should_compile/AddAndOr6.stderr   |   7 +
 .../partial-sigs/should_compile/BoolToBool.hs      |   5 +
 .../partial-sigs/should_compile/BoolToBool.stderr  |   7 +
 .../partial-sigs/should_compile/Defaulting1MROn.hs |   6 +
 .../should_compile/Defaulting1MROn.stderr          |   7 +
 .../should_compile/Defaulting2MROff.hs             |   6 +
 .../should_compile/Defaulting2MROff.stderr         |   7 +
 .../partial-sigs/should_compile/Defaulting2MROn.hs |   6 +
 .../should_compile/Defaulting2MROn.stderr          |   7 +
 .../tests/partial-sigs/should_compile/Either.hs    |   5 +
 .../partial-sigs/should_compile/Either.stderr      |   7 +
 .../should_compile/EqualityConstraint.hs           |   5 +
 .../should_compile/EqualityConstraint.stderr       |   7 +
 .../tests/partial-sigs/should_compile/Every.hs     |   6 +
 .../tests/partial-sigs/should_compile/Every.stderr |   7 +
 .../partial-sigs/should_compile/EveryNamed.hs      |   6 +
 .../partial-sigs/should_compile/EveryNamed.stderr  |   7 +
 .../partial-sigs/should_compile/ExpressionSig.hs   |   5 +
 .../should_compile/ExpressionSig.stderr            |   7 +
 .../should_compile/ExpressionSigNamed.hs           |   6 +
 .../should_compile/ExpressionSigNamed.stderr       |   7 +
 .../should_compile/ExtraConstraints1.hs            |  17 +
 .../should_compile/ExtraConstraints1.stderr        |  11 +
 .../should_compile/ExtraConstraints2.hs            |   8 +
 .../should_compile/ExtraConstraints2.stderr        |   7 +
 .../should_compile/ExtraConstraints3.hs            | 405 +++++++++++++++++++++
 .../should_compile/ExtraConstraints3.stderr        | 234 ++++++++++++
 .../partial-sigs/should_compile/ExtraNumAMROff.hs  |   6 +
 .../should_compile/ExtraNumAMROff.stderr           |   7 +
 .../partial-sigs/should_compile/ExtraNumAMROn.hs   |   6 +
 .../should_compile/ExtraNumAMROn.stderr            |   7 +
 .../tests/partial-sigs/should_compile/Forall1.hs   |   5 +
 .../partial-sigs/should_compile/Forall1.stderr     |   7 +
 .../tests/partial-sigs/should_compile/GenNamed.hs  |   5 +
 .../partial-sigs/should_compile/GenNamed.stderr    |   7 +
 .../partial-sigs/should_compile/HigherRank1.hs     |   5 +
 .../partial-sigs/should_compile/HigherRank1.stderr |   7 +
 .../partial-sigs/should_compile/HigherRank2.hs     |   5 +
 .../partial-sigs/should_compile/HigherRank2.stderr |   7 +
 .../should_compile/LocalDefinitionBug.hs           |  29 ++
 .../should_compile/LocalDefinitionBug.stderr       |   7 +
 .../should_compile/Makefile                        |   0
 .../tests/partial-sigs/should_compile/Meltdown.hs  |  25 ++
 .../partial-sigs/should_compile/Meltdown.stderr    |  18 +
 .../partial-sigs/should_compile/MonoLocalBinds.hs  |  14 +
 .../should_compile/MonoLocalBinds.stderr           |   7 +
 .../partial-sigs/should_compile/NamedTyVar.hs      |   5 +
 .../partial-sigs/should_compile/NamedTyVar.stderr  |   7 +
 .../should_compile/ParensAroundContext.hs          |   5 +
 .../should_compile/ParensAroundContext.stderr      |   7 +
 .../tests/partial-sigs/should_compile/PatBind.hs   |   5 +
 .../partial-sigs/should_compile/PatBind.stderr     |   7 +
 .../tests/partial-sigs/should_compile/PatBind2.hs  |   5 +
 .../partial-sigs/should_compile/PatBind2.stderr    |   7 +
 .../partial-sigs/should_compile/PatternSig.hs      |   5 +
 .../partial-sigs/should_compile/PatternSig.stderr  |   7 +
 .../tests/partial-sigs/should_compile/Recursive.hs |  11 +
 .../partial-sigs/should_compile/Recursive.stderr   |   9 +
 .../should_compile/ScopedNamedWildcards.hs         |  10 +
 .../should_compile/ScopedNamedWildcards.stderr     |   7 +
 .../should_compile/ScopedNamedWildcardsGood.hs     |  13 +
 .../should_compile/ScopedNamedWildcardsGood.stderr |   7 +
 .../tests/partial-sigs/should_compile/ShowNamed.hs |   5 +
 .../partial-sigs/should_compile/ShowNamed.stderr   |   7 +
 .../tests/partial-sigs/should_compile/SimpleGen.hs |   5 +
 .../partial-sigs/should_compile/SimpleGen.stderr   |   7 +
 .../tests/partial-sigs/should_compile/SkipMany.hs  |  10 +
 .../partial-sigs/should_compile/SkipMany.stderr    |  12 +
 .../should_compile/SomethingShowable.hs            |   6 +
 .../should_compile/SomethingShowable.stderr        |   7 +
 .../tests/partial-sigs/should_compile/Uncurry.hs   |   5 +
 .../partial-sigs/should_compile/Uncurry.stderr     |   7 +
 .../partial-sigs/should_compile/UncurryNamed.hs    |   5 +
 .../should_compile/UncurryNamed.stderr             |   7 +
 .../WarningWildcardInstantiations.hs               |   9 +
 .../WarningWildcardInstantiations.stderr           |  48 +++
 testsuite/tests/partial-sigs/should_compile/all.T  |  48 +++
 .../should_fail/AnnotatedConstraint.hs             |  11 +
 .../should_fail/AnnotatedConstraint.stderr         |   7 +
 .../should_fail/AnnotatedConstraintNotForgotten.hs |  15 +
 .../AnnotatedConstraintNotForgotten.stderr         |   5 +
 .../partial-sigs/should_fail/Defaulting1MROff.hs   |   6 +
 .../should_fail/Defaulting1MROff.stderr            |   6 +
 .../ExtraConstraintsWildcardNotEnabled.hs          |   8 +
 .../ExtraConstraintsWildcardNotEnabled.stderr      |   5 +
 .../should_fail/ExtraConstraintsWildcardNotLast.hs |   5 +
 .../ExtraConstraintsWildcardNotLast.stderr         |   6 +
 .../ExtraConstraintsWildcardNotPresent.hs          |  13 +
 .../ExtraConstraintsWildcardNotPresent.stderr      |   6 +
 .../tests/partial-sigs/should_fail/Forall1Bad.hs   |   9 +
 .../partial-sigs/should_fail/Forall1Bad.stderr     |   5 +
 .../InstantiatedNamedWildcardsInConstraints.hs     |   5 +
 .../InstantiatedNamedWildcardsInConstraints.stderr |  13 +
 .../should_fail}/Makefile                          |   0
 .../should_fail/NamedExtraConstraintsWildcard.hs   |   5 +
 .../NamedExtraConstraintsWildcard.stderr           |   5 +
 .../should_fail/NamedWildcardsEnabled.hs           |   5 +
 .../should_fail/NamedWildcardsEnabled.stderr       |  10 +
 .../should_fail/NamedWildcardsNotEnabled.hs        |   7 +
 .../should_fail/NamedWildcardsNotEnabled.stderr    |  21 ++
 .../should_fail/NamedWildcardsNotInMonotype.hs     |   5 +
 .../should_fail/NamedWildcardsNotInMonotype.stderr |   6 +
 .../should_fail/NestedExtraConstraintsWildcard.hs  |   5 +
 .../NestedExtraConstraintsWildcard.stderr          |   6 +
 .../NestedNamedExtraConstraintsWildcard.hs         |   5 +
 .../NestedNamedExtraConstraintsWildcard.stderr     |   5 +
 .../should_fail/PartialClassMethodSignature.hs     |   6 +
 .../should_fail/PartialClassMethodSignature.stderr |   5 +
 .../should_fail/PartialTypeSignaturesDisabled.hs   |   5 +
 .../PartialTypeSignaturesDisabled.stderr           |  10 +
 .../should_fail/ScopedNamedWildcardsBad.hs         |  11 +
 .../should_fail/ScopedNamedWildcardsBad.stderr     |   5 +
 .../tests/partial-sigs/should_fail/TidyClash.hs    |   9 +
 .../partial-sigs/should_fail/TidyClash.stderr      |  16 +
 .../tests/partial-sigs/should_fail/TidyClash2.hs   |   5 +
 .../partial-sigs/should_fail/TidyClash2.stderr     |  54 +++
 .../should_fail/UnnamedConstraintWildcard1.hs      |   5 +
 .../should_fail/UnnamedConstraintWildcard1.stderr  |   5 +
 .../should_fail/UnnamedConstraintWildcard2.hs      |   5 +
 .../should_fail/UnnamedConstraintWildcard2.stderr  |   5 +
 .../partial-sigs/should_fail/WildcardInADT1.hs     |   4 +
 .../partial-sigs/should_fail/WildcardInADT1.stderr |   4 +
 .../partial-sigs/should_fail/WildcardInADT2.hs     |   4 +
 .../partial-sigs/should_fail/WildcardInADT2.stderr |   4 +
 .../partial-sigs/should_fail/WildcardInADT3.hs     |   4 +
 .../partial-sigs/should_fail/WildcardInADT3.stderr |   4 +
 .../should_fail/WildcardInADTContext1.hs           |   4 +
 .../should_fail/WildcardInADTContext1.stderr       |   7 +
 .../should_fail/WildcardInADTContext2.hs           |   4 +
 .../should_fail/WildcardInADTContext2.stderr       |   7 +
 .../partial-sigs/should_fail/WildcardInDefault.hs  |   4 +
 .../should_fail/WildcardInDefault.stderr           |   4 +
 .../partial-sigs/should_fail/WildcardInDeriving.hs |   5 +
 .../should_fail/WildcardInDeriving.stderr          |   4 +
 .../should_fail/WildcardInForeignExport.hs         |   7 +
 .../should_fail/WildcardInForeignExport.stderr     |   5 +
 .../should_fail/WildcardInForeignImport.hs         |   6 +
 .../should_fail/WildcardInForeignImport.stderr     |   5 +
 .../partial-sigs/should_fail/WildcardInGADT1.hs    |   5 +
 .../should_fail/WildcardInGADT1.stderr             |   4 +
 .../partial-sigs/should_fail/WildcardInGADT2.hs    |   5 +
 .../should_fail/WildcardInGADT2.stderr             |   4 +
 .../should_fail/WildcardInInstanceHead.hs          |   8 +
 .../should_fail/WildcardInInstanceHead.stderr      |   4 +
 .../partial-sigs/should_fail/WildcardInNewtype.hs  |   7 +
 .../should_fail/WildcardInNewtype.stderr           |   4 +
 .../should_fail/WildcardInPatSynSig.hs             |   5 +
 .../should_fail/WildcardInPatSynSig.stderr         |   5 +
 .../should_fail/WildcardInTypeFamilyInstanceLHS.hs |   8 +
 .../WildcardInTypeFamilyInstanceLHS.stderr         |   4 +
 .../should_fail/WildcardInTypeFamilyInstanceRHS.hs |   8 +
 .../WildcardInTypeFamilyInstanceRHS.stderr         |   4 +
 .../should_fail/WildcardInTypeSynonymLHS.hs        |   4 +
 .../should_fail/WildcardInTypeSynonymLHS.stderr    |   6 +
 .../should_fail/WildcardInTypeSynonymRHS.hs        |   4 +
 .../should_fail/WildcardInTypeSynonymRHS.stderr    |   4 +
 .../should_fail/WildcardInstantiations.hs          |   9 +
 .../should_fail/WildcardInstantiations.stderr      |  45 +++
 .../should_fail/WildcardsInPatternAndExprSig.hs    |   4 +
 .../WildcardsInPatternAndExprSig.stderr            |  74 ++++
 testsuite/tests/partial-sigs/should_fail/all.T     |  42 +++
 utils/haddock                                      |   2 +-
 219 files changed, 3384 insertions(+), 237 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc d831b6f41b3b89dc4a643069d5668c05a20f3c37


More information about the ghc-commits mailing list