1. 27 Jan, 2016 13 commits
  2. 26 Jan, 2016 15 commits
    • niteria's avatar
      Construct in_scope set in mkTopTCvSubst · 144ddb41
      niteria authored
      The pre-condition on `mkTopTCvSubst` turned out to be wrong and
      not satisfied by any of the callers. I've fixed it, so that it
      constructs the in_scope set from the range of the substitution.
      `mkTopTCvSubst` was also unnecessarily general it is never called
      with `CoVars`, so I changed the type signature and added an assertion.
      
      Test Plan: ./validate --slow
      
      Reviewers: goldfire, simonpj, bgamari, austin
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1801
      
      GHC Trac Issues: #11371
      144ddb41
    • Ryan Scott's avatar
      Split off -Wunused-type-variables from -Wunused-matches · 6817703b
      Ryan Scott authored
      Summary:
      Previously, `-Wunused-matches` would fire whenever it detected unused type
      variables in a type family or data family instance. This can be annoying for
      users who wish to use type variable names as documentation, as being
      `-Wall`-compliant would mean that they'd have to prefix many of their type
      variable names with underscores, making the documentation harder to read.
      
      To avoid this, a new warning `-Wunused-type-variables` was created that only
      encompasses unused variables in family instances. `-Wunused-matches` reverts
      back to its role of only warning on unused term-level pattern names. Unlike
      `-Wunused-matches`, `-Wunused-type-variables` is not implied by `-Wall`.
      
      Fixes #11451.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, ekmett, austin, hvr, simonpj, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1825
      
      GHC Trac Issues: #11451
      6817703b
    • thomie's avatar
      Fix segmentation fault when .prof file not writeable · 6d2bdfd8
      thomie authored
      There are two ways to do retainer profiling. Quoting from the user's guide:
        1. `+RTS -hr` "Breaks down the graph by retainer set"
        2. `+RTS -hr<cc> -h<x>`, where `-h<x>` is one of normal heap profiling
           break-down options (e.g. `-hc`), and `-hr<cc> means "Restrict the
           profile to closures with retainer sets containing cost-centre
           stacks with one of the specified cost centres at the top."
      
      Retainer profiling writes to a .hp file, like the other heap profiling
      options, but also to a .prof file. Therefore, when the .prof file is not
      writeable for whatever reason, retainer profiling should be turned off
      completely.
      
      This worked ok when running the program with `+RTS -hr` (option 1), but a
      segfault would occur when using `+RTS -hr<cc> -h<x>`, with `x!=r` (option 2).
      
      This commit fixes that.
      
      Reviewed by: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1849
      
      GHC Trac Issues: #11489
      6d2bdfd8
    • thomie's avatar
      Nicer error on +RTS -hc without -rtsopts or -prof · e24a9b5d
      thomie authored
      Before:
       * without -rtsopts: Most RTS options are disabled. Link with -rtsopts to enable them.
       * with -rtsopts: invalid heap profile option: -hc
      After:
       * the flag -hc requires the program to be built with -prof
      
      Copy `Note [OPTION_SAFE vs OPTION_UNSAFE]` from commit 8c7ad0bd.
      
      Reviewed by: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1845
      e24a9b5d
    • niteria's avatar
      Pass InScopeSet to substTy in lintTyApp · 01809bcd
      niteria authored
      This is the fix proposed in #11371:
      ```
      In other cases, we already have the in-scope set in hand. Example: in
      CoreLint.lintTyApp we find a call to substTyWith. But Lint carries an
      in-scope set, so it would be easy to pass it to substTyWith.
      ```
      
      Test Plan: ./validate --slow (only pre-existing problems)
      
      Reviewers: simonpj, goldfire, austin, nomeata, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1820
      
      GHC Trac Issues: #11371
      01809bcd
    • Simon Peyton Jones's avatar
      Fix three broken tests involving exceptions · 3798b2aa
      Simon Peyton Jones authored
      See comment:16 in Trac #10712. The tests were wrong, not GHC!
      3798b2aa
    • Herbert Valerio Riedel's avatar
      Update process submodule to 1.4.2.0 release · f1885dfd
      Herbert Valerio Riedel authored
      Most notably, this pulls in a feature needed for #11100 (remote ghci)
      windows-support
      f1885dfd
    • Herbert Valerio Riedel's avatar
      Update transformers submodule to 0.5.1.0 release · 9b716950
      Herbert Valerio Riedel authored
      This shouldn't have any noticeable API changes for GHC
      9b716950
    • Herbert Valerio Riedel's avatar
      5f5dc862
    • Herbert Valerio Riedel's avatar
      Missed plural renaming in user's guide · 34c9a4e4
      Herbert Valerio Riedel authored
      Follow-up to 132c2089
      
      [skip ci]
      34c9a4e4
    • Simon Peyton Jones's avatar
      Fix two cloning-related bugs · 016a0bd1
      Simon Peyton Jones authored
      Crikey!  Not just one but two bugs in type variable cloning,
      both dating from the days before PolyKinds.  Both were shown up
      by Trac #11330.
      
      1. In SetLevels, when floating a case expression we must clone its
         binders, *and* do so in a telescope-aware way, because the
         constructor may bind a kind variable that appears in the kind
         of a type variable.
      
         Instead of doing this (wrongly) by steam, call CoreSubst.cloneBndrs.
      
         I added Notes and did other refactoring at the same time.
      
      2. It turned out that CoreSubst.cloneBndrs calls TyCoRep.cloneTyVarBndr,
         and that too was bogus!  It didn't substitute in the kind of the
         TyVar being cloned.  There was even a comment to say "variables can't
         appear in kinds".  Thta hasn't been true for a long time now.
      
      Easily fixed.
      
      Interestingly, I then found that test
         dependent/should_compile/KindEqualities
      was emitting a new inexhaustive-pattern-match warning.  Sure enough
      it was valid!  So the lack of cloning in cloneTyVarBndr really was
      causing an observable bug; just one that we had not observed.
      016a0bd1
    • Simon Peyton Jones's avatar
      Kill off zipTopTCvSubst in favour of zipOpenTCvSubst · 1c6d70c2
      Simon Peyton Jones authored
      As Bartosz has discovered, the invariants for substitutions were
      wrong, and in particular the "mkTop...Subst" and "zipTop..Subst"
      functions were building substitutions that didn't obey even the
      old invariants.
      
      This patch kills of the bogus zipTopTCvSubst in favour of the
      more robust zipOpenTCvSubst.
      
      I tripped over this because my upcoming patch (concerning SetLevels,
      Trac #11330) triggered an ASSERT failure in the substitution
      well-formedness assertion in TyCoRep.
      1c6d70c2
    • Simon Peyton Jones's avatar
      Add "ticks-exhausted" comment · 47b3f588
      Simon Peyton Jones authored
      This code deliberately builds a subtle negative-occurrence-of-data-type
      example, described in the paper, so with -O it'll give "simplifier
      ticks exhausted".
      
      This patch just adds a comment to explain.
      47b3f588
    • Simon Peyton Jones's avatar
      White space only · cf788a53
      Simon Peyton Jones authored
      cf788a53
    • Simon Peyton Jones's avatar
      Less verbose output for the in-scope set · 632f020b
      Simon Peyton Jones authored
      With -dppr-debug the output for the (ofen-large) InScope set
      was overwhelming.  This makes it smaller.
      
      Only affects debugging.
      632f020b
  3. 25 Jan, 2016 12 commits