1. 03 Dec, 2015 6 commits
    • Ben Gamari's avatar
      Fix haddock syntax · 7b29b0b1
      Ben Gamari authored
      Sadly we can't annotate the elements of a tuple
      7b29b0b1
    • Ben Gamari's avatar
      Revert "Create empty dump files when there was nothing to dump" · c5597bb6
      Ben Gamari authored
      This reverts commit 8cba907a which
      broke `-ddump-to-file`.
      c5597bb6
    • Sergei Trofimovich's avatar
      extending_ghc.rst: fix broken link (Trac #10950) · a034031a
      Sergei Trofimovich authored
      
      
      The error exibits as build failures
      of two types:
      
        1. extending_ghc.rst:: ERROR:
            Anonymous hyperlink mismatch:
              1 references but 0 targets.
            See "backrefs" attribute for IDs.
      
        2. reading sources... [ 33%] glasgow_exts
             Exception occurred:
                pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)
             RecursionError: maximum recursion depth exceeded
             while pickling an object
      
      Broken link created circular reference and failed to
      serialize the result.
      
      Fixed the problem by pointing to relevant section.
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      a034031a
    • Ben Gamari's avatar
      43a31fe4
    • Georgios Karachalias's avatar
      Major Overhaul of Pattern Match Checking (Fixes #595) · 8a506104
      Georgios Karachalias authored
      This patch adresses several problems concerned with exhaustiveness and
      redundancy checking of pattern matching. The list of improvements includes:
      
      * Making the check type-aware (handles GADTs, Type Families, DataKinds, etc.).
        This fixes #4139, #3927, #8970 and other related tickets.
      
      * Making the check laziness-aware. Cases that are overlapped but affect
        evaluation are issued now with "Patterns have inaccessible right hand side".
        Additionally, "Patterns are overlapped" is now replaced by "Patterns are
        redundant".
      
      * Improved messages for literals. This addresses tickets #5724, #2204, etc.
      
      * Improved reasoning concerning cases where simple and overloaded
        patterns are matched (See #322).
      
      * Substantially improved reasoning for pattern guards. Addresses #3078.
      
      * OverloadedLists extension does not break exhaustiveness checking anymore
        (addresses #9951). Note that in general this cannot be handled but if we know
        that an argument has type '[a]', we treat it as a list since, the instance of
        'IsList' gives the identity for both 'fromList' and 'toList'. If the type is
        not clear or is not the list type, then the check cannot do much still. I am
        a bit concerned about OverlappingInstances though, since one may override the
        '[a]' instance with e.g. an '[Int]' instance that is not the identity.
      
      * Improved reasoning for nested pattern matching (partial solution). Now we
        propagate type and (some) term constraints deeper when checking, so we can
        detect more inconsistencies. For example, this is needed for #4139.
      
      I am still not satisfied with several things but I would like to address at
      least the following before the next release:
          Term constraints are too many and not printed for non-exhaustive matches
      (with the exception of literals). This sometimes results in two identical (in
      appearance) uncovered warnings. Unless we actually show their difference, I
      would like to have a single warning.
      8a506104
    • Sergei Trofimovich's avatar
      users_guide/glasgow_exts.rst: fix link markup · d25f3c07
      Sergei Trofimovich authored
      
      
      sphinx-1.3.1 found errors as:
        users_guide/glasgow_exts.rst:1799:
          WARNING: malformed hyperlink target.
        users_guide/glasgow_exts.rst:10638:
          WARNING: Inline interpreted text or phrase
          reference start-string without end-string.
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      d25f3c07
  2. 02 Dec, 2015 12 commits
  3. 01 Dec, 2015 7 commits
    • Simon Peyton Jones's avatar
      Refactor treatment of wildcards · 1e041b73
      Simon Peyton Jones authored
      This patch began as a modest refactoring of HsType and friends, to
      clarify and tidy up exactly where quantification takes place in types.
      Although initially driven by making the implementation of wildcards more
      tidy (and fixing a number of bugs), I gradually got drawn into a pretty
      big process, which I've been doing on and off for quite a long time.
      
      There is one compiler performance regression as a result of all
      this, in perf/compiler/T3064.  I still need to look into that.
      
      * The principal driving change is described in Note [HsType binders]
        in HsType.  Well worth reading!
      
      * Those data type changes drive almost everything else.  In particular
        we now statically know where
      
             (a) implicit quantification only (LHsSigType),
                 e.g. in instance declaratios and SPECIALISE signatures
      
             (b) implicit quantification and wildcards (LHsSigWcType)
                 can appear, e.g. in function type signatures
      
      * As part of this change, HsForAllTy is (a) simplified (no wildcards)
        and (b) split into HsForAllTy and HsQualTy.  The two contructors
        appear when and only when the correponding user-level construct
        appears.  Again see Note [HsType binders].
      
        HsExplicitFlag disappears altogether.
      
      * Other simplifications
      
           - ExprWithTySig no longer needs an ExprWithTySigOut variant
      
           - TypeSig no longer needs a PostRn name [name] field
             for wildcards
      
           - PatSynSig records a LHsSigType rather than the decomposed
             pieces
      
           - The mysterious 'GenericSig' is now 'ClassOpSig'
      
      * Renamed LHsTyVarBndrs to LHsQTyVars
      
      * There are some uninteresting knock-on changes in Haddock,
        because of the HsSyn changes
      
      I also did a bunch of loosely-related changes:
      
      * We already had type synonyms CoercionN/CoercionR for nominal and
        representational coercions.  I've added similar treatment for
      
            TcCoercionN/TcCoercionR
      
            mkWpCastN/mkWpCastN
      
        All just type synonyms but jolly useful.
      
      * I record-ised ForeignImport and ForeignExport
      
      * I improved the (poor) fix to Trac #10896, by making
        TcTyClsDecls.checkValidTyCl recover from errors, but adding a
        harmless, abstract TyCon to the envt if so.
      
      * I did some significant refactoring in RnEnv.lookupSubBndrOcc,
        for reasons that I have (embarrassingly) now totally forgotten.
        It had to do with something to do with import and export
      
      Updates haddock submodule.
      1e041b73
    • Bartosz Nitka's avatar
      Make the determinism tests more robust · b432e2f3
      Bartosz Nitka authored
      The tests weren't explicit enough about comparing under different
      unique allocation strategies. This led to some confusion on my part when
      I started overriding flags in `testsuite/mk/test.mk`.
      Includes a `.gitignore` rule.
      
      Test Plan: harbormaster
      
      Reviewers: austin, simonmar, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1555
      b432e2f3
    • Gabor Greif's avatar
      Fix warning about unused pattern variable · 44c3e376
      Gabor Greif authored
      44c3e376
    • Gabor Greif's avatar
      Remove duplicated line · 36c12478
      Gabor Greif authored
      36c12478
    • Bartosz Nitka's avatar
      Fix grammar and typo in TcTyDecls · 6dce643d
      Bartosz Nitka authored
      Summary: It's just a docufix.
      
      Test Plan: just a docufix
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1550
      6dce643d
    • thomie's avatar
      Build system: Add stage specific SRC_HC_(WARNING_)OPTS · 14d0f7f1
      thomie authored
      * Add stage specific versions of SRC_HC_OPTS. These are currently only
        used for -Werror. The previous combination of GhcStage2HcOpts and
        GhcLibHcOpts didn't apply to utils/*.
      
      * Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be
        used for new warning supression flags that should not be passed to the
        bootstrap compiler.
      
      * Move -Wall (and -Werror) related code back to mk/warnings.mk, where it
        was before 987d5427. Now all warning related code is nicely together.
        Include mk/warnings.mk after mk/custom-settings.mk to make this work.
      
      Reviewed By: bgamari, hvr
      
      Differential Revision: https://phabricator.haskell.org/D1536
      14d0f7f1
    • Ömer Sinan Ağacan's avatar
      MkId: Typos in comments · afb72139
      Ömer Sinan Ağacan authored
      afb72139
  4. 29 Nov, 2015 11 commits
  5. 28 Nov, 2015 1 commit
  6. 27 Nov, 2015 2 commits
  7. 26 Nov, 2015 1 commit