1. 10 Feb, 2016 6 commits
    • Simon Peyton Jones's avatar
      Wrap solveEqualities in checkNoErrs · b565830d
      Simon Peyton Jones authored
      This simple change fixes Trac #11563, #11520, #11516, #11399.
      See esp the comments in #11520.
      See Note [Fail fast on kind errors] in TcSimplify
      Merge to 8.0 branch
    • Sergei Trofimovich's avatar
      mkUserGuide: fix option wrapping in a table · a8249726
      Sergei Trofimovich authored
      Noticed as a sphinx warning:
              WARNING: Inline interpreted text or phrase
              reference start-string without end-string.
      Which pointed to broken table.
      Before the patch table looked like:
          | :ghc-flag:`-Wno-unticked-promoted-constructors |
          | `                                              |
      After the patch long link is on a single line:
          | :ghc-flag:`-Wno-unticked-promoted-constructors`    |
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
    • Sergei Trofimovich's avatar
      docs: add newline after '.. ghc-flag::' · c57d019c
      Sergei Trofimovich authored
      Noticed when looked through sphinx warnings:
              SEVERE: Duplicate ID: "ghc-flag-Issue"
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
    • Edward Z. Yang's avatar
      Error early when you register with too old a version of Cabal. · d80caca1
      Edward Z. Yang authored and Ben Gamari's avatar Ben Gamari committed
      On the GHC 8.0 RCs, multiple users reported a very strange error
      whereby GHC would complain that the symbols names recorded in interface
      files did not match the expected name.  The reason for this is
      that they were using an old version of Cabal which chose symbol
      names differently from the installed package ID ('id' field) which
      the package was to be installed with; GHC 8.0 now mandates that
      these coincides.
      This change adds a test to ghc-pkg to make sure that 'id' and 'key'
      (which is how Cabal previously reported what the symbol name
      was supposed to be) match; if they don't match or key is missing,
      we assume that the Cabal was too old.
      Bikeshed points:
          - Should we offer more information about how to upgrade
            Cabal correctly (i.e. specify a version?)
          - Should we allow for a missing 'key'?  If we allow for
            'key' to be missing, we lose the ability to detect
            Cabal from GHC 7.8 or earlier being used.  If we
            require it to be specified, then it will not be possible
            for Cabal to deprecate the (unused) field and remove it
            without having BC for 8.0.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: austin, bgamari, hvr
      Reviewed By: hvr
      Subscribers: bergmark, thomie
      Differential Revision: https://phabricator.haskell.org/D1892
      GHC Trac Issues: #11558
    • owst's avatar
      Expand users' guide TH declaration groups section (#9813) · 93e2c8ff
      owst authored and Ben Gamari's avatar Ben Gamari committed
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1899
    • bollmann's avatar
      add Template Haskell regression test for #9022. · 2f9931e3
      bollmann authored and Ben Gamari's avatar Ben Gamari committed
      The bug itself has already been fixed in #10734, so this
      only adds another regression test (as given in the ticket).
      Test Plan: ./validate
      Reviewers: goldfire, austin, thomie, bgamari
      Reviewed By: bgamari
      Differential Revision: https://phabricator.haskell.org/D1898
      GHC Trac Issues: #9022
  2. 09 Feb, 2016 9 commits
  3. 08 Feb, 2016 21 commits
    • Ömer Sinan Ağacan's avatar
      Remove unused LiveVars and SRT fields of StgCase · 023fc92f
      Ömer Sinan Ağacan authored
      We also need to update `stgBindHasCafRefs` assertion with this change,
      as we no longer have the pre-computed SRT, LiveVars etc. We rename it to
      `topStgBindHasCafRefs` and implement it like this:
      A non-updatable top-level binding may refer to a CAF by referring to a
      top-level definition with CAFs. A top-level definition may have CAFs if
      it's updatable. At this point (because this is done after TidyPgm)
      top-level Ids (whether imported or defined in this module) are
      GlobalIds, so the top-levelness test is easy. (see also comments in the
      Reviewers: bgamari, simonpj, austin
      Reviewed By: simonpj
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1889
      GHC Trac Issues: #11550
    • Simon Peyton Jones's avatar
      Define tyConRolesRepresentational and use it · 489a9a3b
      Simon Peyton Jones authored
      tyConRolesRepresentational is just a version of tyConRolesX, but
      specialised for a Representational argument. Saves a bit of extra
      argument passing and pattern matching, and tyConRolesX was often
      called when we knew the argument role was Representational.
      Rather to my surprise this made the compiler allocate 5% less
      for tests T9872{b,c,d}.  At least I think it's this commit.
      Good thing, regardless.
    • Simon Peyton Jones's avatar
      Test Trac #11552 · c9ac9de7
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Define mkTvSubst, and use it · fac0efc3
      Simon Peyton Jones authored
         mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst
      produces a TCvSubst with an empty CvSubstEnv
    • Simon Peyton Jones's avatar
      Some tiding up in TcGenDeriv · 96d45145
      Simon Peyton Jones authored
      ..around newtype deriving instances.
      See esp the new Note [Newtype-deriving instances]
      No change in behaviour
    • Ben Gamari's avatar
      release notes: Note new two-step allocator · 5a58634e
      Ben Gamari authored
    • Simon Peyton Jones's avatar
      Fix a nasty superclass expansion bug · 43e02d12
      Simon Peyton Jones authored
      This patch fixes Trac #11523.
      * The basic problem was that TcRnTypes.superClassesMightHelp was
        returning True of a Derived constraint, and that led to us
        expanding Given superclasses, which produced the same Derived
        constraint again, and so on infinitely.  We really want to do
        this only if there are unsolve /Wanted/ contraints!
      * On the way I made TcSMonad.getUnsolvedInerts a bit more
        discriminating about which Derived equalities it returns;
        see Note [Unsolved Derived equalities] in TcSMonad
      * Lots of new comments in TcSMonad.
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Use runTcSDeriveds for simplifyDefault · f79b9ec9
      Simon Peyton Jones authored
      This is a small refactoring, no change in behaviour.
    • Simon Peyton Jones's avatar
      Improve error messages for recursive superclasses · d6b68be1
      Simon Peyton Jones authored
      If we fail to typecheck by blowing the constraint simplifier
      iteration limit, we want to see the limit-blowing meessage.
      Previously it was being suppressed by the type /error/, which
      suppress the iteration-limit /warning/.  Solution: make the
      iteration-limit message into an error.
    • Simon Peyton Jones's avatar
      Improve tracing in TcInteract · 72129686
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Comment out some traceFlat calls · e72665b5
      Simon Peyton Jones authored
      They were excessively verbose.  I've commented them out rather than
      deleting so that they can easily be restored.
    • Simon Peyton Jones's avatar
      Document and improve superclass expansion · 8871737d
      Simon Peyton Jones authored
      When investigating Trac #11523 I found that superclass
      expansion was a little over-aggressive; we were sort of
      unrolling each loop twice.
      This patch corrects that, and adds explanatory comments.
    • Simon Peyton Jones's avatar
      White space and comments only · ee11a84c
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Add comments to TcCoercibleFail · a96c4e7c
      Simon Peyton Jones authored
      Flag up the problem highlighted in Trac #11518 comment:15
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Add Edward Kmett's example as a test case · 4e653012
      Simon Peyton Jones authored
      This is a more stressful example of T11480.
    • Ben Gamari's avatar
    • Simon Peyton Jones's avatar
      Fix SimpleFail12 error output · 20f90ea3
      Simon Peyton Jones authored
      I missed this on my previous commit, somehow
         2cf3ca Allow foralls in instance decls
    • Simon Peyton Jones's avatar
      Allow foralls in instance decls · 2cf3cac6
      Simon Peyton Jones authored
      This patch finally makes it possible to have explicit
      foralls in an instance decl
         instance forall (a :: *). Eq a => Eq [a] where ...
      This is useful to allow kind signatures or indeed
      explicicit kind for-alls; see Trac #11519
      I thought it would be really easy, because an instance
      declaration already contains an actual HsSigType, so all
      the syntactic baggage is there.  But in fact it turned
      out that instance declarations were kind-checked a
      little differently, because the body kind of the forall
      is 'Constraint' rather than '*'.
      So I fixed that.  There a slight kludge
      (see Note [Body kind of a HsQualTy], but it's still a
      significant improvement.
      I also did the usual other round of refactoring,
      improved a few error messages, tidied up comments etc.
      The only significant aspect of all that was
        * Kill mkNakedSpecSigmaTy, mkNakedPhiTy, mkNakedFunTy
          These function names suggest that they do something
          complicated, but acutally they do nothing. So I
          killed them.
        * Swap the arg order of mkNamedBinder, just so that it is
          convenient to say 'map (mkNamedBinder Invisible) tvs'
        * I had to improve isPredTy, to deal with (illegal)
          types like
             (Eq a => Eq [a]) => blah
          See Note [isPeredTy complications] in Type.hs
      Still to come: user manual documentation for the
      instance-decl change.
    • Simon Peyton Jones's avatar
      Remove unused export from TcUnify · 8263d09e
      Simon Peyton Jones authored
      ..namely buildImplication.
      Plus white space in TcDeriv
  4. 07 Feb, 2016 4 commits