<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haskell.git, branch wip/shnajd-TTG-SrcLocs</title>
<subtitle>gitlab.haskell.org: ghc/ghc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/'/>
<entry>
<title>[TTG: Handling Source Locations] Foundation and Pat (Part 2)</title>
<updated>2018-11-09T19:29:49+00:00</updated>
<author>
<name>Shayan-Najd</name>
<email>sh.najd@gmail.com</email>
</author>
<published>2018-11-09T19:29:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=6741b78e1abef9f8df381261e541fcdbb30d0d48'/>
<id>6741b78e1abef9f8df381261e541fcdbb30d0d48</id>
<content type='text'>
- Fixing a bug
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fixing a bug
</pre>
</div>
</content>
</entry>
<entry>
<title>Rebasing</title>
<updated>2018-11-08T22:13:58+00:00</updated>
<author>
<name>Shayan-Najd</name>
<email>sh.najd@gmail.com</email>
</author>
<published>2018-11-08T22:13:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=4032519866788b6de76d48d2187452b543a95197'/>
<id>4032519866788b6de76d48d2187452b543a95197</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://github.com/ghc/ghc into wip/shnajd-TTG-SrcLocs</title>
<updated>2018-11-08T22:12:48+00:00</updated>
<author>
<name>Shayan-Najd</name>
<email>sh.najd@gmail.com</email>
</author>
<published>2018-11-08T22:12:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=869d99bcc8ef4aa69dfb79825e4ee73af96cab62'/>
<id>869d99bcc8ef4aa69dfb79825e4ee73af96cab62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[TTG: Handling Source Locations] Foundation and Pat</title>
<updated>2018-11-08T22:09:13+00:00</updated>
<author>
<name>Shayan-Najd</name>
<email>sh.najd@gmail.com</email>
</author>
<published>2018-11-08T22:09:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=6be401f9cb9cfc2fa0836fd1775e9d58b781c534'/>
<id>6be401f9cb9cfc2fa0836fd1775e9d58b781c534</id>
<content type='text'>
Trac Issue: #15495
This patch removes the ping-pong style from `HsPat` (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A).

- the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced
- some instances of `HasSrcSpan` are introduced
- some constructors `L` are replaced with `cL`
- some patterns `L` are replaced with `dL` view pattern
- some type annotation are necessarily updated updated (e.g., `Pat p` --&gt; `Pat (GhcPass p)`)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Trac Issue: #15495
This patch removes the ping-pong style from `HsPat` (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A).

- the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced
- some instances of `HasSrcSpan` are introduced
- some constructors `L` are replaced with `cL`
- some patterns `L` are replaced with `dL` view pattern
- some type annotation are necessarily updated updated (e.g., `Pat p` --&gt; `Pat (GhcPass p)`)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #15845 by defining etaExpandFamInstLHS and using it</title>
<updated>2018-11-08T15:26:48+00:00</updated>
<author>
<name>Ryan Scott</name>
<email>ryan.gl.scott@gmail.com</email>
</author>
<published>2018-11-08T15:26:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=63a817074a8d49798bfd46a6545906fff143e924'/>
<id>63a817074a8d49798bfd46a6545906fff143e924</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>testsuite: Save performance metrics in git notes.</title>
<updated>2018-11-07T17:07:11+00:00</updated>
<author>
<name>David Eichmann</name>
<email>davide@Well-Typed.com</email>
</author>
<published>2018-11-07T17:02:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=932cd41d8c7984c767c1b3b58e05146f69cc5c15'/>
<id>932cd41d8c7984c767c1b3b58e05146f69cc5c15</id>
<content type='text'>
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 &lt;metric(s)&gt; &lt;options&gt;: &lt;tests&gt;
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;metric(s)&gt; &lt;options&gt;: &lt;tests&gt;
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "CircleCI: Build DWARF-enabled Linux bindists"</title>
<updated>2018-11-07T14:18:10+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2018-11-07T14:17:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=82a5c2410a47b16df09039b9786c2c0e34ba130e'/>
<id>82a5c2410a47b16df09039b9786c2c0e34ba130e</id>
<content type='text'>
This reverts commit 406978c478e4b14e677f396499420d7b8e5d21fd.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 406978c478e4b14e677f396499420d7b8e5d21fd.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Multiple fixes / improvements for LLVM backend"</title>
<updated>2018-11-07T13:09:40+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2018-11-07T13:06:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=39cd12b8d73b9d931ce1acaa7d9e74271c51086f'/>
<id>39cd12b8d73b9d931ce1acaa7d9e74271c51086f</id>
<content type='text'>
This reverts commit adcb5fb47c0942671d409b940d8884daa9359ca4.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit adcb5fb47c0942671d409b940d8884daa9359ca4.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Fix for T14251 on ARM"</title>
<updated>2018-11-07T13:09:40+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2018-11-07T13:05:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=802ce6eb090838d4e7573d96cf056afd2d898b78'/>
<id>802ce6eb090838d4e7573d96cf056afd2d898b78</id>
<content type='text'>
This reverts commit d8495549ba9d194815c2d0eaee6797fc7c00756a.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d8495549ba9d194815c2d0eaee6797fc7c00756a.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LlvmCodeGen] Fixes for Int8#/Word8#</title>
<updated>2018-11-07T13:09:40+00:00</updated>
<author>
<name>Michal Terepeta</name>
<email>michal.terepeta@gmail.com</email>
</author>
<published>2018-11-07T13:03:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=f424515fd8cbc2b7380cdf8427f972d062940bd5'/>
<id>f424515fd8cbc2b7380cdf8427f972d062940bd5</id>
<content type='text'>
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 &lt;michal.terepeta@gmail.com&gt;

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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;michal.terepeta@gmail.com&gt;

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
</pre>
</div>
</content>
</entry>
</feed>
