1. 15 Feb, 2018 4 commits
    • Alp Mestanogullari's avatar
      rts.cabal.in: advertise profiling flavours of libraries, behind a flag · 0c2350c2
      Alp Mestanogullari authored
      The make build system appears to be doing a bit of magic in order to supply
      the profiled flavours of libHSrts and libCffi, as they're not advertised in
      the 'extra-library-flavours' field of rts.cabal.in. This patch explicitly
      advertises _p and _thr_p flavours of the RTS library and libCffi, but only
      when the RTS is configured with the (newly introduced) 'profiling' flag.
      This is necessary for Hadrian, as a branch (soon to be merged) does away with
      ghc-cabal and relies just on Cabal to get package information. Without this
      patch, Cabal can never inform us that _p and _thr_p flavours should be
      built (and registered in the package db) as well, which obviously prevents us
      from building a profiled GHC.
      Reviewers: bgamari, erikd, simonmar
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4409
    • Moritz Angermann's avatar
      Update .cabal files for Cabal 2.1 · e03ca71f
      Moritz Angermann authored
      cabal introduces SPDX identifier, and as such we need to change the
      BSD3 license name. Also the >= qualifier is no longer prefered.
      Test Plan: ./validate
      Reviewers: bgamari, erikd, simonmar
      Reviewed By: bgamari
      Subscribers: alpmestan, rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4406
    • Moritz Angermann's avatar
      Adds `smp` flag to rts.cabal. · d5ff33d3
      Moritz Angermann authored
      Reviewers: bgamari, erikd, simonmar
      Reviewed By: simonmar
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4393
    • Moritz Angermann's avatar
      adds -latomic to. ghc-prim · ec9aacf3
      Moritz Angermann authored
      Reviewers: bgamari, hvr
      Reviewed By: bgamari
      Subscribers: erikd, hvr, rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4378
  2. 14 Feb, 2018 1 commit
    • Sergey Vinokurov's avatar
      Various documentation improvements · df449e17
      Sergey Vinokurov authored
       * Fix missing code example in changelog for 8.4.1
       * List 'setEnv' as opposite of 'getEnv'
         It seems best to direct users to use 'System.Environment.setEnv'
         rather than 'System.Posix.Env.putEnv'. This is due to 'setEnv' being
         located in the same module as 'getEnv' and my virtue of working on
         Windows platform, whereas 'putEnv' does not have that quality because
         it's part of the 'unix' package.
       * Reflect in docs the fact that 'readMVar' is not a composition of
         'takeMVVar' and 'putMVar' any more
  3. 13 Feb, 2018 4 commits
    • Tao He's avatar
      Raise parse error for `data T where`. · 8936ab69
      Tao He authored
      Empty GADTs data declarations can't be identified in type checker. This
      patch adds additional checks in parser and raise a parse error when
      encounter empty GADTs declarations but extension `GADTs` is not enabled.
      Only empty declarations are checked in parser to avoid affecting
      error messages related to missing GADTs extension.
      This patch should fix issue 8258.
      Signed-off-by: Tao He's avatarHE, Tao <sighingnow@gmail.com>
      Test Plan: make test TEST="T8258 T8258NoGADTs"
      Reviewers: bgamari, mpickering, alanz, RyanGlScott
      Reviewed By: bgamari, RyanGlScott
      Subscribers: adamse, RyanGlScott, rwbarton, thomie, mpickering, carter
      GHC Trac Issues: #8258
      Differential Revision: https://phabricator.haskell.org/D4350
    • Ben Gamari's avatar
      Fix tests broken by c9a88db3 · 0c9777b7
      Ben Gamari authored
    • Ömer Sinan Ağacan's avatar
      Collect CCs in CorePrep, including CCs in unfoldings · 59574058
      Ömer Sinan Ağacan authored
      This patch includes two changes:
      1. Move cost centre collection from `SCCfinal` to `CorePrep`, to be able
         to collect cost centres in unfoldings. `CorePrep` drops unfoldings, so
         that's the latest stage in the compilation pipeline for this.
         After this change `SCCfinal` no longer collects all cost centres, but
         it still generates & collects CAF cost centres + updates cost centre
         stacks of `StgRhsClosure` and `StgRhsCon`s.
         This fixes #5889.
      2. Initialize cost centre stack fields of `StgRhs` in `coreToStg`. With
         this we no longer need to update cost centre stack fields in
         `SCCfinal`, so that module is removed.
         Cost centre initialization explained in Note [Cost-centre
         initialization plan].
         Because with -fcaf-all we need to attach a new cost-centre to each
         CAF, `coreTopBindToStg` now returns `CollectedCCs`.
      Test Plan: validate
      Reviewers: simonpj, bgamari, simonmar
      Reviewed By: simonpj, bgamari
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #5889
      Differential Revision: https://phabricator.haskell.org/D4325
    • David Feuer's avatar
      Make ($!) representation-polymorphic · c9a88db3
      David Feuer authored
      Now that `($)` is representation-polymorphic, `($!)` should
      surely follow suit.
      Reviewers: hvr, bgamari, simonpj
      Reviewed By: bgamari, simonpj
      Subscribers: simonpj, rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4382
  4. 12 Feb, 2018 1 commit
  5. 10 Feb, 2018 1 commit
  6. 08 Feb, 2018 2 commits
    • Simon Peyton Jones's avatar
      Fix isDroppableCt (Trac #14763) · 6edafe3b
      Simon Peyton Jones authored
      When finishing up an implication constraint, it's a bit tricky to
      decide which Derived constraints to retain (for error reporting) and
      which to discard.  I got this wrong in commit
         (Remove wc_insol from WantedConstraints)
      The particular problem in Trac #14763 was that we were reporting as an
      error a fundep-generated constraint
        (ex ~ T)
      where 'ex' is an existentially-bound variable in a pattern match.
      But this isn't really an error at all.
      This patch fixes the problem. Indeed, since I had to understand
      this rather tricky code, I took the opportunity to clean it up
      and document better.  See
        isDroppableCt :: Ct -> Bool
      and Note [Dropping derived constraints]
      I also removed wl_deriv altogether from the WorkList data type.  It
      was there in the hope of gaining efficiency by not even processing
      lots of derived constraints, but it has turned out that most derived
      constraints (notably equalities) must be processed anyway; see
      Note [Prioritise equalities] in TcSMonad.
      The two are coupled because to decide which constraints to put in
      wl_deriv I was using another variant of isDroppableCt.  Now it's much
      simpler -- and perhaps even more efficient too.
    • Douglas Wilson's avatar
      rts: fix barf format attribute · 059596df
      Douglas Wilson authored
      Summary: See definition of PRINTF above the change
      Reviewers: bgamari, erikd, simonmar, Phyx
      Reviewed By: Phyx
      Subscribers: Phyx, rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4392
  7. 07 Feb, 2018 4 commits
    • Herbert Valerio Riedel's avatar
      Use SPDX syntax in rts/package.conf.in · be53d19e
      Herbert Valerio Riedel authored
      This was an oversight from 2671cccd
      as it wasn't obvious to assume one would go the trouble to manually
      construct the pkg-db entries... :-)
    • Simon Peyton Jones's avatar
      Fix solveOneFromTheOther for RecursiveSuperclasses · 65069806
      Simon Peyton Jones authored
      This patch fixes the redundant superclass expansion
      in Trac #14774.
      The main change is to fix TcInterac.solveOneFromTheOther, so
      that it does not prefer a work-item with a binding if that binding
      transitively depends on the inert item we are comparing it with.
      Explained in Note [Replacement vs keeping] in TcInert, esp
      item (c) of the "Constraints coming from the same level" part.
      To make this work I refactored out a new function
      TcEvidence.findNeededEvVars, which was previously buried
      inside TcSimplify.neededEvVars.
      I added quite a few more comments and signposts about superclass
    • Simon Peyton Jones's avatar
      Comments only · 41d29d5a
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Fix utterly bogus TagToEnum rule in caseRules · 4aa98f4a
      Simon Peyton Jones authored
      In prelRules we had:
        tx_con_tte :: DynFlags -> AltCon -> AltCon
        tx_con_tte _      DEFAULT      = DEFAULT
        tx_con_tte dflags (DataAlt dc)
          | tag == 0  = DEFAULT   -- See Note [caseRules for tagToEnum]
          | otherwise = LitAlt (mkMachInt dflags (toInteger tag))
      The tag==0 case is totally wrong, and led directly to Trac #14768.
      See "Beware" in Note [caseRules for tagToEnum] (in the patch).
      Easily fixed, though!
  8. 06 Feb, 2018 10 commits
  9. 05 Feb, 2018 1 commit
  10. 04 Feb, 2018 2 commits
    • Ben Gamari's avatar
      testsuite: Add testcase for #14754 · 606edbfb
      Ben Gamari authored
    • Ben Gamari's avatar
      cmm: Revert more aggressive CBE due to #14226 · 50adbd7c
      Ben Gamari authored
      Trac #14226 noted that the C-- CBE pass frequently fails to
      common up semantically identical blocks due to the differences in local
      register naming. These patches fixed this by making the pass consider
      equality up to alpha-renaming.
      However, the new logic failed to consider the possibility that local
      register naming *may* matter across multiple blocks. This lead to the
      regression #14754. I'll need to do a bit of thinking on a proper
      solution to this but in the meantime I'm reverting all four patches.
      This reverts commit a27056f9.
      This reverts commit 6f990c54.
      This reverts commit 9aa73892.
      This reverts commit 7920a7d9.
  11. 03 Feb, 2018 3 commits
  12. 02 Feb, 2018 7 commits