1. 15 Dec, 2016 8 commits
    • Ryan Scott's avatar
      Warn about missing instance methods that start with an underscore · 503219e3
      Ryan Scott authored
      Previously, GHC would not warn whenever there was a class instance that
      didn't implement a class method whose name begins with an underscore.
      
      Fixes #12959.
      
      Test Plan: make test TEST=WarnMinimal
      
      Reviewers: austin, bgamari, simonpj
      
      Reviewed By: bgamari, simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2849
      
      GHC Trac Issues: #12959
      503219e3
    • Matthew Pickering's avatar
      Fix pretty printing of MINIMAL signatures · 1ec632f8
      Matthew Pickering authored
      Reviewers: austin, alanz, bgamari
      
      Reviewed By: alanz, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2836
      1ec632f8
    • Simon Marlow's avatar
      Fix cost-centre-stacks bug (#5654) · 394231b3
      Simon Marlow authored
      This fixes some cases of wrong stacks being generated by the profiler.
      For background and details on the fix see
      `Note [Evaluating functions with profiling]` in `rts/Apply.cmm`.
      
      This does have an impact on allocations for some programs when
      profiling.  nofib results:
      
      ```
         k-nucleotide          +0.0%     +8.8%    +11.0%    +11.0%      0.0%
               puzzle          +0.0%    +12.5%     0.244     0.246      0.0%
            typecheck           0.0%     +8.7%    +16.1%    +16.2%      0.0%
      ------------------------------------------------------------------------
      --------
                  Min          -0.0%     -0.0%    -34.4%    -35.5%    -25.0%
                  Max          +0.0%    +12.5%    +48.9%    +49.4%    +10.6%
       Geometric Mean          +0.0%     +0.6%     +2.0%     +1.8%     -0.3%
      
      ```
      
      But runtimes don't seem to be affected much, and the examples I looked
      at were completely legitimate.  For example, in puzzle we have this:
      
      ```
      position :: ItemType -> StateType ->  BankType
      position Bono = bonoPos
      position Edge = edgePos
      position Larry = larryPos
      position Adam = adamPos
      ```
      
      where the identifiers on the rhs are all record selectors.  Previously
      the profiler gave a stack that looked like
      
      ```
        position
        bonoPos
        ...
      ```
      
      i.e. `bonoPos` was at the same level of the call stack as `position`,
      but now it looks like
      
      ```
        position
         bonoPos
         ...
      ```
      
      I used the normaliser from the testsuite to diff the profiling output
      from other nofib programs and they all looked better.
      
      Test Plan:
      * the broken test passes
      * validate
      * compiled and ran all of nofib, measured perf, diff'd several .prof
      files
      
      Reviewers: niteria, erikd, austin, scpmw, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2804
      
      GHC Trac Issues: #5654, #10007
      394231b3
    • Ben Gamari's avatar
      testsuite: Specify expected allocations of T12877 for Windows · 2940a617
      Ben Gamari authored
      This deviated by 12% from the expected allocations on Windows.
      Yet another case of #12758.
      2940a617
    • Ryan Scott's avatar
      Make unboxedTuple{Type,Data}Name support 0- and 1-tuples · 9550b8d8
      Ryan Scott authored
      Previously, these functions were hardcoded so as to always `error`
      whenever given an argument of 0 or 1. This restriction can be lifted
      pretty easily, however.
      
      This requires a slight tweak to `isBuiltInOcc_maybe` in `TysWiredIn` to
      allow it to recognize `Unit#` (which is the hard-wired `OccName` for
      unboxed 1-tuples).
      
      Fixes #12977.
      
      Test Plan: make test TEST=12977
      
      Reviewers: austin, goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2847
      
      GHC Trac Issues: #12977
      9550b8d8
    • Ben Gamari's avatar
      testsuite: Mark T9577 as broken due to #12965 · be5384ce
      Ben Gamari authored
      Test Plan: validate
      
      Reviewers: austin, Phyx
      
      Reviewed By: Phyx
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2835
      
      GHC Trac Issues: #12965
      be5384ce
    • Tamar Christina's avatar
      Reset FPU precision back to MSVCRT defaults · 6f7d8279
      Tamar Christina authored
      Mingw-w64 does a stupid thing. They set the FPU precision to extended
      mode by default.  The reasoning is that it's for compatibility with GNU
      Linux ported libraries. However the problem is this is incompatible with
      the standard Windows double precision mode.  In fact, if we create a new
      OS thread then Windows will reset the FPU to double precision mode.  So
      we end up with a weird state where the main thread by default has a
      different precision than any child threads.
      
      Test Plan: ./validate new test T7289
      
      Reviewers: simonmar, austin, bgamari, erikd
      
      Reviewed By: simonmar
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2819
      
      GHC Trac Issues: #7289
      6f7d8279
    • Maciej Bielecki's avatar
      Show constraints when reporting typed holes · 0c3341b2
      Maciej Bielecki authored
      This patch implements the display of constraints in the error message
      for typed holes.
      
      Test Plan: validate, read docs
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2767
      
      GHC Trac Issues: #10614
      0c3341b2
  2. 14 Dec, 2016 1 commit
  3. 13 Dec, 2016 6 commits
  4. 12 Dec, 2016 3 commits
  5. 11 Dec, 2016 1 commit
    • Moritz Angermann's avatar
      Make globals use sharedCAF · c3c70244
      Moritz Angermann authored
      Summary:
      The use of globals is quite painful when multiple rts are loaded, e.g.
      when plugins are loaded, which bring in a second rts. The sharedCAF
      appraoch was employed for the FastStringTable; I've taken the libery
      to extend this to the other globals I could find.
      
      This is a reboot of D2575, that should hopefully not exhibit the same
      windows build issues.
      
      Reviewers: Phyx, simonmar, goldfire, bgamari, austin, hvr, erikd
      
      Reviewed By: Phyx, simonmar, bgamari
      
      Subscribers: mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2773
      c3c70244
  6. 10 Dec, 2016 1 commit
  7. 09 Dec, 2016 6 commits
    • Ben Gamari's avatar
      testsuite: Mark prog003 as broken on Windows · 24a4fe29
      Ben Gamari authored
      Due to #11317.
      24a4fe29
    • Ryan Scott's avatar
      Rename TH constructors for deriving strategies · 5349d648
      Ryan Scott authored
      After talking to Richard, he and I concluded that choosing the rather
      common name `Newtype` to represent the corresponding deriving strategy
      in Template Haskell was a poor choice of name. I've opted to rename it
      to something less common (`NewtypeStrategy`) while we still have time. I
      also renamed the corrsponding datatype in the GHC internals so as to
      match it.
      
      Reviewers: austin, goldfire, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2814
      
      GHC Trac Issues: #10598
      5349d648
    • Rufflewind's avatar
      Ensure each test inherits the TEST_HC_OPTS · d1df8d1c
      Rufflewind authored
      This is so that global test flags that control the error formatting are
      propagated correctly.  This patch is kind of related to: D2718
      
      The stderr for API annotations is ignored entirely now per @alanz's
      suggestion.
      
      Test Plan: validate
      
      Reviewers: thomie, alanz, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: alanz
      
      Differential Revision: https://phabricator.haskell.org/D2808
      d1df8d1c
    • Ben Gamari's avatar
      Mark T12903 as broken on OS X · 62418b87
      Ben Gamari authored
      Something has recently broken it. See #12956.
      62418b87
    • Sylvain Henry's avatar
      Scrutinee Constant Folding · d3b546b1
      Sylvain Henry authored
      This patch introduces new rules to perform constant folding through
      case-expressions.
      
      E.g.,
      ```
      case t -# 10# of _ {  ===> case t of _ {
               5#      -> e1              15#     -> e1
               8#      -> e2              18#     -> e2
               DEFAULT -> e               DEFAULT -> e
      ```
      
      The initial motivation is that it allows "Merge Nested Cases"
      optimization to kick in and to further simplify the code
      (see Trac #12877).
      
      Currently we recognize the following operations for Word# and Int#: Add,
      Sub, Xor, Not and Negate (for Int# only).
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2762
      
      GHC Trac Issues: #12877
      d3b546b1
    • Ryan Scott's avatar
      Disambiguate reified closed type family kinds in TH · f65ff2c4
      Ryan Scott authored
      Summary:
      A continuation of #8953. This fixes an oversight in which the
      left-hand sides of closed type families, when reified in Template Haskell,
      would not be given kind annotations, even when they are necessary for
      disambiguation purposes in the presence of `PolyKinds`.
      
      Fixes #8953 and #12646.
      
      Test Plan: ./validate
      
      Reviewers: hvr, bgamari, austin, goldfire
      
      Reviewed By: goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2795
      
      GHC Trac Issues: #8953, #12646
      f65ff2c4
  8. 08 Dec, 2016 4 commits
  9. 07 Dec, 2016 5 commits
    • Alan Zimmerman's avatar
      Remove stray commented out line in all.T · 9bcc4e33
      Alan Zimmerman authored
      9bcc4e33
    • Alan Zimmerman's avatar
      Fix pretty printer test to nog generate stdout · 58d78dc0
      Alan Zimmerman authored
      It was doing a dump to stdout, which is not repeatable across platforms.
      58d78dc0
    • Alan Zimmerman's avatar
      Add HsSyn prettyprinter tests · 499e4382
      Alan Zimmerman authored
      Summary:
      Add prettyprinter tests, which take a file, parse it, pretty print it,
      re-parse the pretty printed version and then compare the original and
      new ASTs (ignoring locations)
      
      Updates haddock submodule to match the AST changes.
      
      There are three issues outstanding
      
      1. Extra parens around a context are not reproduced. This will require an
         AST change and will be done in a separate patch.
      
      2. Currently if an `HsTickPragma` is found, this is not pretty-printed,
         to prevent noise in the output.
      
         I am not sure what the desired behaviour in this case is, so have left
         it as before. Test Ppr047 is marked as expected fail for this.
      
      3. Apart from in a context, the ParsedSource AST keeps all the parens from
         the original source.  Something is happening in the renamer to remove the
         parens around visible type application, causing T12530 to fail, as the
         dumped splice decl is after the renamer.
      
         This needs to be fixed by keeping the parens, but I do not know where they
         are being removed.  I have amended the test to pass, by removing the parens
         in the expected output.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, mpickering, simonpj, bgamari, austin
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: simonpj, goldfire, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2752
      
      GHC Trac Issues: #3384
      499e4382
    • Ben Gamari's avatar
      Really mark T9577 as broken · 4dd6b37f
      Ben Gamari authored
      I failed at the last attempt.
      4dd6b37f
    • Ben Gamari's avatar
      Mark T9577 as broken on Darwin due to #12937 · 39143a47
      Ben Gamari authored
      39143a47
  10. 06 Dec, 2016 4 commits
  11. 05 Dec, 2016 1 commit