1. 26 Mar, 2016 1 commit
  2. 17 Mar, 2016 1 commit
  3. 15 Mar, 2016 2 commits
  4. 29 Feb, 2016 2 commits
  5. 27 Feb, 2016 3 commits
  6. 26 Feb, 2016 1 commit
    • Simon Peyton Jones's avatar
      Exclude TyVars from the constraint solver · 7496be5c
      Simon Peyton Jones authored
      There is a general invariant that the constraint solver doesn't see
      TyVars, only TcTyVars.  But when checking the generic-default
      signature of a class, we called checkValidType on the generic-default
      type, which had the class TyVar free. That in turn meant that it wasn't
      considered during flattening, which led to the error reported in
      Trac #11608.
      
      The fix is simple: call checkValidType on the /closed/ type. Easy.
      
      While I was at it, I added a bunch of ASSERTs about the TcTyVar
      invariant.
      7496be5c
  7. 25 Feb, 2016 4 commits
    • barrucadu's avatar
      Print which warning-flag controls an emitted warning · bb5afd3c
      barrucadu authored
      Both gcc and clang tell which warning flag a reported warning can be
      controlled with, this patch makes ghc do the same. More generally, this
      allows for annotated compiler output, where an optional annotation is
      displayed in brackets after the severity.
      
      This also adds a new flag `-f(no-)show-warning-groups` to control
      whether to show which warning-group (such as `-Wall` or `-Wcompat`)
      a warning belongs to. This flag is on by default.
      
      This implements #10752
      
      Reviewed By: quchen, bgamari, hvr
      
      Differential Revision: https://phabricator.haskell.org/D1943
      bb5afd3c
    • thomie's avatar
      Testsuite: do not write empty files on 'make accept' · 1badf157
      thomie authored
      Also prevent showing '\ No newline at end of file' in diff output.
      1badf157
    • thomie's avatar
      Testsuite: delete empty files [skip ci] · 9b49c65f
      thomie authored
      9b49c65f
    • Georgios Karachalias's avatar
      (Alternative way to) address #8710 · 67393977
      Georgios Karachalias authored
      Issue a separate warning per redundant (or inaccessible) clause.
      This way each warning can have more precice location information
      (the location of the clause under consideration and not the whole
      match).
      
      I thought that this could be too much but actually the number of
      such warnings is bound by the number of cases matched against (in
      contrast to the non-exhaustive warnings which may be exponentially
      more).
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1920
      
      GHC Trac Issues: #8710
      67393977
  8. 24 Feb, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Address #11471 by putting RuntimeRep in kinds. · d8c64e86
      eir@cis.upenn.edu authored
      See Note [TYPE] in TysPrim. There are still some outstanding
      pieces in #11471 though, so this doesn't actually nail the bug.
      
      This commit also contains a few performance improvements:
      
      * Short-cut equality checking of nullary type syns
      
      * Compare types before kinds in eqType
      
      * INLINE coreViewOneStarKind
      
      * Store tycon binders separately from kinds.
      
      This resulted in a ~10% performance improvement in compiling
      the Cabal package. No change in functionality other than
      performance. (This affects the interface file format, though.)
      
      This commit updates the haddock submodule.
      d8c64e86
  9. 23 Feb, 2016 3 commits
  10. 17 Feb, 2016 2 commits
    • eir@cis.upenn.edu's avatar
      Fix #11246. · 489e6ab5
      eir@cis.upenn.edu authored
      We have to instantiate any invisible arguments to type families
      right away. This is now done in tcTyCon in TcHsType.
      
      testcase: typecheck/should_compile/T11246
      489e6ab5
    • thomie's avatar
      Testsuite: delete compiler_lt/le/gt/ge setup functions · 6f25fb32
      thomie authored
      Since we're not consisently keeping track of which tests should pass
      with which compiler versions, there is no point in keeping these
      functions.
      
      Update submodules containers, hpc and stm.
      6f25fb32
  11. 15 Feb, 2016 1 commit
    • Simon Peyton Jones's avatar
      Improve error message suppression · 18cd7124
      Simon Peyton Jones authored
      TcErrors has a system for suppressing some type errors if a more
      serious one occurs.  But there was a crucial missing case, which
      sometimes resulted in a cascade of irrelevant errors overwhelming
      the actual cause. This was Trac #11541.
      
      The fix is simple.  Worth merging to 8.0
      18cd7124
  12. 12 Feb, 2016 3 commits
  13. 10 Feb, 2016 1 commit
  14. 09 Feb, 2016 1 commit
    • Ben Gamari's avatar
      TcErrors: Fix plural form of "instance" error · c8702e30
      Ben Gamari authored
      Previously "types" was inappropriately made plural instead of
      "instance",
      
          instance Eq Ordering -- Defined in ‘GHC.Classes’
          ...plus 24 others
          ...plus 13 instance involving out-of-scope typess
      c8702e30
  15. 08 Feb, 2016 1 commit
  16. 06 Feb, 2016 2 commits
  17. 02 Feb, 2016 1 commit
    • niteria's avatar
      Use a correct substitution in tcCheckPatSynDecl · 07ed2413
      niteria authored
      The `substTheta` call didn't have the free variables of the
      `prov_theta` in the `in_scope` set. It should be enough to add
      `univ_tvs`, as all the `ex_tvs` are already in the domain of
      the substitution.
      
      Test Plan: added a testcase
      
      Reviewers: simonpj, bgamari, goldfire, austin
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1879
      
      GHC Trac Issues: #11524
      07ed2413
  18. 27 Jan, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Refactor the typechecker to use ExpTypes. · 00cbbab3
      eir@cis.upenn.edu authored
      The idea here is described in [wiki:Typechecker]. Briefly,
      this refactor keeps solid track of "synthesis" mode vs
      "checking" in GHC's bidirectional type-checking algorithm.
      When in synthesis mode, the expected type is just an IORef
      to write to.
      
      In addition, this patch does a significant reworking of
      RebindableSyntax, allowing much more freedom in the types
      of the rebindable operators. For example, we can now have
      `negate :: Int -> Bool` and
      `(>>=) :: m a -> (forall x. a x -> m b) -> m b`. The magic
      is in tcSyntaxOp.
      
      This addresses tickets #11397, #11452, and #11458.
      
      Tests:
        typecheck/should_compile/{RebindHR,RebindNegate,T11397,T11458}
        th/T11452
      00cbbab3
  19. 25 Jan, 2016 1 commit
    • Simon Peyton Jones's avatar
      Special-case implicit params in superclass expansion · ff21795a
      Simon Peyton Jones authored
      This issue came up in Trac #11480, and is documented in
      Note [When superclasses help] in TcRnTypes.
      
      We were getting a spurious warning
        T11480.hs:1:1: warning:
           solveWanteds: too many iterations (limit = 4)
      
      The fix is easy.  A bit of refactoring along the way.
      
      The original bug report in Trac #11480 appears to work
      fine in HEAD and the 8.0 branch but I added a regression
      test in this commit as well.
      ff21795a
  20. 24 Jan, 2016 1 commit
  21. 23 Jan, 2016 2 commits
  22. 22 Jan, 2016 1 commit
  23. 18 Jan, 2016 2 commits
    • Simon Peyton Jones's avatar
      Test Trac #11379 · 8e50301f
      Simon Peyton Jones authored
      8e50301f
    • Simon Peyton Jones's avatar
      Refactoring on IdInfo and system derived names · ec8a188a
      Simon Peyton Jones authored
      Some modest refactoring, triggered in part by Trac #11051
      
      * Kill off PatSynId, ReflectionId in IdDetails
        They were barely used, and only for pretty-printing
      
      * Add helper function Id.mkExportedVanillaId, and use it
      
      * Polish up OccName.isDerivedOccName, as a predicate for
        definitions generated internally by GHC, which we
        might not want to show to the user.
      
      * Kill off unused OccName.mkDerivedTyConOcc
      
      * Shorten the derived OccNames for newtype and data
        instance axioms
      
      * A bit of related refactoring around newFamInstAxiomName
      ec8a188a
  24. 15 Jan, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #11254. · 39ea4b4b
      eir@cis.upenn.edu authored
      This moves the call to tcSubType into the context of the
      checkInstConstraints call, allowing the deferred type error
      somewhere to hang its hat.
      39ea4b4b
  25. 14 Jan, 2016 1 commit