1. 23 Jun, 2017 4 commits
    • Ben Gamari's avatar
      testsuite: Fix cabal01 for real this time · a6774e1d
      Ben Gamari authored
      Somehow the previous version passed on master but fails on ghc-8.2.
      Will look deeper later.
      a6774e1d
    • Matthew Pickering's avatar
      Use actual universal tvs in check for naughty record selectors · 0e2839a2
      Matthew Pickering authored
      The naughty record selector check means to limit selectors which would
      lead to existential tyvars escaping their scope. With record pattern
      synonyms, there are situations where universal tyvars don't appear in
      the result type, for example:
      
      ```
      pattern ReadP :: Read a => a -> String
      pattern ReadP{readp} <- (read -> readp)
      ```
      
      This is a similar issue to #11224 where we assumed that we can decide
      which variables are universal and which are existential by the syntactic
      check of seeing which appear in the result type. The fix is to use
      `univ_tvs` from `conLikeFullSig` rather than the previous approximation.
      But we must also remember to apply `EqSpec`s so we use the free
      variables from `inst_tys` which is precisely `univ_tvs` with `EqSpecs`
      applied.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3649
      
      (cherry picked from commit 90771209)
      0e2839a2
    • Ben Gamari's avatar
      testsuite: Fix cabal01 test · 379c07bb
      Ben Gamari authored
      The other-modules field listed things that weren't in fact modules,
      causing this test to fail. See Cabal #4567.
      
      Test Plan: Validate
      
      Reviewers: hvr, austin
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3665
      
      (cherry picked from commit e13edee3)
      379c07bb
    • Ben Gamari's avatar
      compiler: Eliminate pprTrace in SPT entry addition codepath · 0fa0d6c2
      Ben Gamari authored
      Test Plan: Load program with StaticPointers into GHCi, ensure no
      tracing output makes it in.
      
      Reviewers: austin
      
      Subscribers: rwbarton, thomie, RyanGlScott
      
      GHC Trac Issues: #12356
      
      Differential Revision: https://phabricator.haskell.org/D3663
      
      (cherry picked from commit 84cf095d)
      0fa0d6c2
  2. 22 Jun, 2017 7 commits
  3. 19 Jun, 2017 4 commits
  4. 16 Jun, 2017 10 commits
    • Ben Gamari's avatar
      Bump Cabal submodule to 2.0.0.1 · 1ab05dac
      Ben Gamari authored
      1ab05dac
    • Simon Peyton Jones's avatar
      Fix the treatment of 'closed' definitions · 15af7156
      Simon Peyton Jones authored
      The IdBindingInfo field of ATcId serves two purposes
      
      - to control generalisation when we have -XMonoLocalBinds
      - to check for floatability when dealing with (static e)
      
      These are related, but not the same, and they'd becomme confused.
      Trac #13804 showed this up via an example like this:
      
        f periph = let sr :: forall a. [a] -> [a]
                       sr = if periph then reverse else id
      
                       sr2 = sr
                       -- The question: is sr2 generalised?
                       -- It should be, because sr has a type sig
                       -- even though it has periph free
                   in
                   (sr2 [True], sr2 "c")
      
      Here sr2 should be generalised, despite the free var 'periph'
      in 'sr' because 'sr' has a closed type signature.
      
      I documented all this very carefully this time, in TcRnTypes:
        Note [Meaning of IdBindingInfo]
        Note [Bindings with closed types: ClosedTypeId]
      
      (cherry picked from commit dc8e6861)
      15af7156
    • Ryan Scott's avatar
      GHC.Stats cleanup · 96706799
      Ryan Scott authored
      This does two things:
      
      * The `RtsTime` type wasn't exported, but it is used as the type of
        several record fields. Let's export it and give it some documentation.
      * Neither `RTSStats` nor `GCDetails` have `Read` or `Show` instances,
        but `GCStats` does! Let's fix this discrepancy.
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: goldfire, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3625
      
      (cherry picked from commit 811a2986)
      96706799
    • Ben Gamari's avatar
      base: Validate input in setNumCapabilities · a4e78208
      Ben Gamari authored
      Test Plan: validate
      
      Reviewers: austin, hvr, erikd, simonmar
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13832
      
      Differential Revision: https://phabricator.haskell.org/D3652
      
      (cherry picked from commit 98494031)
      a4e78208
    • niteria's avatar
      Fix #13807 - foreign import nondeterminism · 40f4efb1
      niteria authored
      The problem was that the generated label included
      a freshly assigned Unique value.
      
      Test Plan:
      Added a new test and looked at the generated stub:
      
      ```
       #include "HsFFI.h"
       #ifdef __cplusplus
       extern "C" {
       #endif
       extern HsInt zdmainzdAzdAzuzzlzzgzzg(StgStablePtr the_stableptr);
       extern HsInt zdmainzdAzdAzumkStringWriter(StgStablePtr the_stableptr);
       #ifdef __cplusplus
       }
       #endif
      ```
      
      ./validate
      
      Reviewers: simonmar, austin, bgamari
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13807
      
      Differential Revision: https://phabricator.haskell.org/D3633
      
      (cherry picked from commit dcdc3916)
      40f4efb1
    • Ben Gamari's avatar
      users-guide: Document multi-line DEPRECATED pragmas · d8794aa5
      Ben Gamari authored
      Fixes #13791.
      
      [skip ci]
      
      Test Plan: Read it
      
      Reviewers: austin
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13791
      
      Differential Revision: https://phabricator.haskell.org/D3639
      
      (cherry picked from commit 8f726089)
      d8794aa5
    • Ben Gamari's avatar
      Bump time submodule to 1.8.0.2 · a5e045af
      Ben Gamari authored
      a5e045af
    • Simon Marlow's avatar
      Fix a lost-wakeup bug in BLACKHOLE handling (#13751) · 62a4f066
      Simon Marlow authored
      Summary:
      The problem occurred when
      * Threads A & B evaluate the same thunk
      * Thread A context-switches, so the thunk gets blackholed
      * Thread C enters the blackhole, creates a BLOCKING_QUEUE attached to
        the blackhole and thread A's `tso->bq` queue
      * Thread B updates the blackhole with a value, overwriting the BLOCKING_QUEUE
      * We GC, replacing A's update frame with stg_enter_checkbh
      * Throw an exception in A, which ignores the stg_enter_checkbh frame
      
      Now we have C blocked on A's tso->bq queue, but we forgot to check the
      queue because the stg_enter_checkbh frame has been thrown away by the
      exception.
      
      The solution and alternative designs are discussed in Note [upd-black-hole].
      
      This also exposed a bug in the interpreter, whereby we were sometimes
      context-switching without calling `threadPaused()`.  I've fixed this
      and added some Notes.
      
      Test Plan:
      * `cd testsuite/tests/concurrent && make slow`
      * validate
      
      Reviewers: niteria, bgamari, austin, erikd
      
      Reviewed By: erikd
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13751
      
      Differential Revision: https://phabricator.haskell.org/D3630
      
      (cherry picked from commit 59847290)
      62a4f066
    • Ben Gamari's avatar
      build.mk: Disable -g by default · 1767f542
      Ben Gamari authored
      1767f542
    • Ben Gamari's avatar
      Bump haddock submodule · 5eb05459
      Ben Gamari authored
      5eb05459
  5. 15 Jun, 2017 3 commits
    • Simon Peyton Jones's avatar
      Stop the specialiser generating loopy code · a7a1d7fd
      Simon Peyton Jones authored
      This patch fixes a bad bug in the specialiser, which showed up as
      Trac #13429.  When specialising an imported DFun, the specialiser could
      generate a recusive loop where none existed in the original program.
      
      It's all rather tricky, and I've documented it at some length in
         Note [Avoiding loops]
      
      We'd encoutered exactly this before (Trac #3591) but I had failed
      to realise that the very same thing could happen for /imported/
      DFuns.
      
      I did quite a bit of refactoring.
      
      The compiler seems to get a tiny bit faster on
         deriving/perf/T10858
      but almost all the gain had occurred before now; this
      patch just pushed it over the line.
      
      (cherry picked from commit 2b74bd9d)
      a7a1d7fd
    • Simon Peyton Jones's avatar
      Make CallInfo into a data type with fields · 24f9d075
      Simon Peyton Jones authored
      Simple refactor, no change in behaviour
      
      (cherry picked from commit cb5ca5f3)
      24f9d075
    • Ben Gamari's avatar
      testsuite: Bump T9675 allocations · b0b330e9
      Ben Gamari authored
      b0b330e9
  6. 14 Jun, 2017 4 commits
  7. 23 May, 2017 6 commits
  8. 22 May, 2017 2 commits