1. 11 Nov, 2018 3 commits
  2. 08 Nov, 2018 1 commit
    • Ryan Scott's avatar
      Fix #15845 by defining etaExpandFamInstLHS and using it · 63a81707
      Ryan Scott authored
      Summary:
      Both #9692 and #14179 were caused by GHC being careless
      about using eta-reduced data family instance axioms. Each of those
      tickets were fixed by manually whipping up some code to eta-expand
      the axioms. The same sort of issue has now caused #15845, so I
      figured it was high time to factor out the code that each of these
      fixes have in common.
      
      This patch introduces the `etaExpandFamInstLHS` function, which takes
      a family instance's type variables, LHS types, and RHS type, and
      returns type variables and LHS types that have been eta-expanded if
      necessary, in the case of a data family instance. (If it's a type
      family instance, `etaExpandFamInstLHS` just returns the supplied type
      variables and LHS types unchanged).
      
      Along the way, I noticed that many references to
      `Note [Eta reduction for data families]` (in `FamInstEnv`) had
      slightly bitrotted (they either referred to a somewhat different
      name, or claimed that the Note lived in a different module), so
      I took the liberty of cleaning those up.
      
      Test Plan: make test TEST="T9692 T15845"
      
      Reviewers: goldfire, bgamari
      
      Reviewed By: goldfire
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15845
      
      Differential Revision: https://phabricator.haskell.org/D5294
      63a81707
  3. 07 Nov, 2018 8 commits
    • davide's avatar
      testsuite: Save performance metrics in git notes. · 932cd41d
      davide authored and Ben Gamari's avatar Ben Gamari committed
      This patch makes the following improvement:
        - Automatically records test metrics (per test environment) so that
          the programmer need not supply nor update expected values in *.T
          files.
          - On expected metric changes, the programmer need only indicate the
            direction of change in the git commit message.
        - Provides a simple python tool "perf_notes.py" to compare metrics
          over time.
      
      Issues:
        - Using just the previous commit allows performance to drift with each
          commit.
          - Currently we allow drift as we have a preference for minimizing
            false positives.
          - Some possible alternatives include:
            - Use metrics from a fixed commit per test: the last commit that
              allowed a change in performance (else the oldest metric)
            - Or use some sort of aggregate since the last commit that allowed
              a change in performance (else all available metrics)
            - These alternatives may result in a performance issue (with the
              test driver) having to heavily search git commits/notes.
        - Run locally, performance tests will trivially pass unless the tests
          were run locally on the previous commit. This is often not the case
          e.g.  after pulling recent changes.
      
      Previously, *.T files contain statements such as:
      ```
      stats_num_field('peak_megabytes_allocated', (2, 1))
      compiler_stats_num_field('bytes allocated',
                               [(wordsize(64), 165890392, 10)])
      ```
      This required the programmer to give the expected values and a tolerance
      deviation (percentage). With this patch, the above statements are
      replaced with:
      ```
      collect_stats('peak_megabytes_allocated', 5)
      collect_compiler_stats('bytes allocated', 10)
      ```
      So that programmer must only enter which metrics to test and a tolerance
      deviation. No expected value is required. CircleCI will then run the
      tests per test environment and record the metrics to a git note for that
      commit and push them to the git.haskell.org ghc repo. Metrics will be
      compared to the previous commit. If they are different by the tolerance
      deviation from the *.T file, then the corresponding test will fail. By
      adding to the git commit message e.g.
      ```
       # Metric (In|De)crease <metric(s)> <options>: <tests>
      Metric Increase ['bytes allocated', 'peak_megabytes_allocated'] \
               (test_env='linux_x86', way='default'):
          Test012, Test345
      Metric Decrease 'bytes allocated':
          Test678
      Metric Increase:
          Test711
      ```
      This will allow the noted changes (letting the test pass). Note that by
      omitting metrics or options, the change will apply to all possible
      metrics/options (i.e. in the above, an increase for all metrics in all
      test environments is allowed for Test711)
      
      phabricator will use the message in the description
      
      Reviewers: bgamari, hvr
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #12758
      
      Differential Revision: https://phabricator.haskell.org/D5059
      932cd41d
    • Ben Gamari's avatar
      Revert "CircleCI: Build DWARF-enabled Linux bindists" · 82a5c241
      Ben Gamari authored
      This reverts commit 406978c4.
      82a5c241
    • Ben Gamari's avatar
      Revert "Multiple fixes / improvements for LLVM backend" · 39cd12b8
      Ben Gamari authored
      This reverts commit adcb5fb4.
      39cd12b8
    • Ben Gamari's avatar
      Revert "Fix for T14251 on ARM" · 802ce6eb
      Ben Gamari authored
      This reverts commit d8495549.
      802ce6eb
    • Michal Terepeta's avatar
      [LlvmCodeGen] Fixes for Int8#/Word8# · f424515f
      Michal Terepeta authored and Ben Gamari's avatar Ben Gamari committed
      
      
      This fixes two isssues:
      
      - Using bitcast for MO_XX_Conv
        Arguments to a bitcast must be of the same size. We should be using
        `trunc` and `zext` instead.
      
      - Using unsupported MO_*_QuotRem for LLVM
        The two primops `MO_*_QuotRem` are not supported by the LLVM backend,
      so
        we shouldn't use them for `Int8#`/`Word8#` (just as we do not use
      them for
        `Int#`/`Word#`).
      Signed-off-by: Michal Terepeta's avatarMichal Terepeta <michal.terepeta@gmail.com>
      
      Test Plan: manually run tests with WAY=llvm
      
      Reviewers: bgamari, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15864
      
      Differential Revision: https://phabricator.haskell.org/D5304
      f424515f
    • Ben Gamari's avatar
      CircleCI: Build DWARF-enabled Linux bindists · 406978c4
      Ben Gamari authored
      406978c4
    • Ben Gamari's avatar
      Bump directory submodule to 1.3.3.1 · 648b0c2d
      Ben Gamari authored
      648b0c2d
    • Ben Gamari's avatar
      integer-gmp: Fix TBA in changelog · 7189469a
      Ben Gamari authored
      7189469a
  4. 06 Nov, 2018 1 commit
  5. 05 Nov, 2018 1 commit
  6. 04 Nov, 2018 1 commit
    • Roland Senn's avatar
      Fix for Trac #15611: Scope errors lie about what modules are imported. · 1a3b9bd0
      Roland Senn authored and Krzysztof Gogolewski's avatar Krzysztof Gogolewski committed
      Summary:
      For the error message:
          Not in scope X.Y
          Module X does not export Y
          No module named ‘X’ is imported:
      there are 2 cases, where we don't show the last "no module named is imported" line:
      1. If the module X has been imported.
      2. If the module X is the current module. There are 2 subcases:
      
         2.1 If the unknown module name is in a input source file,
             then we can use the getModule function to get the current module name.
      
         2.2 If the unknown module name has been entered by the user in GHCi,
             then the getModule function returns something like "interactive:Ghci1",
             and we have to check the current module in the last added entry of
             the HomePackageTable.
      
      Test Plan: make test TESTS="T15611a T15611b"
      
      Reviewers: monoidal, hvr, thomie, dfeuer, bgamari, DavidEichmann
      
      Reviewed By: monoidal, DavidEichmann
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15611
      
      Differential Revision: https://phabricator.haskell.org/D5284
      1a3b9bd0
  7. 02 Nov, 2018 8 commits
  8. 01 Nov, 2018 8 commits
    • Matthías Páll Gissurarson's avatar
      Add built-in syntax suggestions, and refactor to allow library use · 1c92f193
      Matthías Páll Gissurarson authored and Ben Gamari's avatar Ben Gamari committed
      Summary:
      This change to the valid hole fits adds built-in syntax candidates (like (:) and []),
      so that they are checked in addition to what is in scope.
      
      The rest is merely a refactor and export of the functions used to find the valid
      hole fits, since there was interest at ICFP to use the valid hole fit machinery for
      additional uses. By exporting the `tcFilterHoleFits` function, this can now be done
      without having to rely on parsing the actual error message.
      
      Test Plan: Test for built-in syntax included
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: RyanGlScott, rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5227
      1c92f193
    • Alp Mestanogullari's avatar
      hadrian: build ghc-iserv-prof in addition to ghc-iserv · 695f1f2f
      Alp Mestanogullari authored and Ben Gamari's avatar Ben Gamari committed
      As it is required for 10+ tests.
      
      Hadrian didn't give us a chance to build a given executable in vanilla
      and profiling, simultaneously, under two different names. This patch
      implements support for this in general and applies it to
      ghc-iserv[-prof].
      
      Test Plan: scc001 fails without this patch, passes with it.
      
      Reviewers: snowleopard, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: simonpj, ndmitchell, simonmar, rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5255
      695f1f2f
    • Ben Gamari's avatar
      users-guide: Fix formatting of eventlog format documentation · fcd919f9
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Test Plan: Read it
      
      Reviewers: mpickering
      
      Reviewed By: mpickering
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5264
      fcd919f9
    • Zhou Fangyi's avatar
      Data.Maybe: add callstack for fromJust (Trac #15559) · 614028e3
      Zhou Fangyi authored and Ben Gamari's avatar Ben Gamari committed
      Per feature request, add `HasCallStack` to `fromJust` in `Data.Maybe`
      and use `error` instead of `errorWithoutStackTrace`. This allows
      `fromJust` to print call stacks when throwing the error.
      
      Also add a new test case for the behaviour, modify existing test cases
      for new signature
      
      Test Plan: New test cases
      
      Reviewers: hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: ulysses4ever, rwbarton, carter
      
      GHC Trac Issues: #15559
      
      Differential Revision: https://phabricator.haskell.org/D5256
      614028e3
    • Vladislav Zavialov's avatar
      Lower precedence for {-# UNPACK #-} · a78e23b8
      Vladislav Zavialov authored and Ben Gamari's avatar Ben Gamari committed
      Test Plan: Validate
      
      Reviewers: goldfire, bgamari
      
      Subscribers: osa1, mpickering, rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5221
      a78e23b8
    • Richard Eisenberg's avatar
      Don't lint erroneous programs. · 1f72a1c8
      Richard Eisenberg authored
      newFamInst lints its types. This is good. But it's not so good
      when there have been errors and thus recovery tycons are about.
      So we now don't.
      
      Fixes #15796.
      
      Test case: typecheck/should_fail/T15796
      1f72a1c8
    • Richard Eisenberg's avatar
      Actually fail in failIfEmitsConstraints · 74ed9c1c
      Richard Eisenberg authored
      The function TcHsType.failIfEmitsConstraints says that it fails.
      It even does so in its name. But it didn't! It *reported* constraints
      but didn't fail. Now it does.
      
      This is important in tcHsClsInstType; see the comments therein.
      
      This was discovered while looking at #15797, but that ticket
      requires visible kind application to exhibit the bug; the test
      case will come with the patch for #12045.
      74ed9c1c
    • Richard Eisenberg's avatar
      Fix embarrassing, egregious bug in roles of (->) · 255d2e32
      Richard Eisenberg authored
      Previously, I had inexplicably decided that (->)'s roles
      were all Representational. But, of course, its first two
      parameters are *dependent* RuntimeReps. All dependent parameters
      have a Nominal role, because all roles in kinds are Nominal.
      
      Fix is easy, but I have no idea how the world hasn't come
      crashing down before now.
      
      This was found while investigating #15801, which requires
      visible type application in types to observe. Hence, the test
      case will come with the main patch for #12045.
      255d2e32
  9. 31 Oct, 2018 1 commit
  10. 30 Oct, 2018 5 commits
  11. 29 Oct, 2018 3 commits