<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haskell.git/libraries/base/Control/Exception, branch wip/stringbuffer</title>
<subtitle>gitlab.haskell.org: ghc/ghc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/'/>
<entry>
<title>Remove all the unnecessary LANGUAGE pragmas</title>
<updated>2020-08-05T08:01:15+00:00</updated>
<author>
<name>Hécate</name>
<email>hecate+gitlab@glitchbra.in</email>
</author>
<published>2020-08-01T16:40:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=eb7013c3037538aa9c947a21dbbfd7c297929ac8'/>
<id>eb7013c3037538aa9c947a21dbbfd7c297929ac8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unboxed-sums GC ptr-slot rubbish value (#17791)</title>
<updated>2020-05-10T01:46:38+00:00</updated>
<author>
<name>Sylvain Henry</name>
<email>sylvain@haskus.fr</email>
</author>
<published>2020-04-22T09:23:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=951c1fb03d80094c8b0d9bcc463d86fa71695b3a'/>
<id>951c1fb03d80094c8b0d9bcc463d86fa71695b3a</id>
<content type='text'>
This patch allows boot libraries to use unboxed sums without implicitly
depending on `base` package because of `absentSumFieldError`.

See updated Note [aBSENT_SUM_FIELD_ERROR_ID] in GHC.Core.Make
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch allows boot libraries to use unboxed sums without implicitly
depending on `base` package because of `absentSumFieldError`.

See updated Note [aBSENT_SUM_FIELD_ERROR_ID] in GHC.Core.Make
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo in documentation of Base.hs.</title>
<updated>2019-12-05T21:07:51+00:00</updated>
<author>
<name>Matthias Braun</name>
<email>matthias.braun@liwest.at</email>
</author>
<published>2019-12-03T19:57:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=f171b3582d44746bf8b08897a3b23bc97e5dbdda'/>
<id>f171b3582d44746bf8b08897a3b23bc97e5dbdda</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #15038</title>
<updated>2018-05-10T08:53:09+00:00</updated>
<author>
<name>Ömer Sinan Ağacan</name>
<email>omeragacan@gmail.com</email>
</author>
<published>2018-05-10T08:13:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=b2ff5dde399cd012218578945ada1d9ff68daa35'/>
<id>b2ff5dde399cd012218578945ada1d9ff68daa35</id>
<content type='text'>
We introduce a new Id for unused pointer values in unboxed sums that is
not CAFFY. Because the Id is not CAFFY it doesn't make non-CAFFY
definitions CAFFY, fixing #15038.

To make sure anything referenced by the new id will be retained we get a
stable pointer to in on RTS startup.

Test Plan: Passes validate

Reviewers: simonmar, simonpj, hvr, bgamari, erikd

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15038

Differential Revision: https://phabricator.haskell.org/D4680
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We introduce a new Id for unused pointer values in unboxed sums that is
not CAFFY. Because the Id is not CAFFY it doesn't make non-CAFFY
definitions CAFFY, fixing #15038.

To make sure anything referenced by the new id will be retained we get a
stable pointer to in on RTS startup.

Test Plan: Passes validate

Reviewers: simonmar, simonpj, hvr, bgamari, erikd

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15038

Differential Revision: https://phabricator.haskell.org/D4680
</pre>
</div>
</content>
</entry>
<entry>
<title>Kill off irrefutable pattern errors</title>
<updated>2018-01-15T18:53:46+00:00</updated>
<author>
<name>David Feuer</name>
<email>david.feuer@gmail.com</email>
</author>
<published>2018-01-15T17:38:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=492e6044577519b59f390008362de98e9517e04d'/>
<id>492e6044577519b59f390008362de98e9517e04d</id>
<content type='text'>
Distinguishing between "refutable" and "irrefutable" patterns
(as described by the Haskell Report) in incomplete pattern errors
was more confusing than helpful. Remove references to irrefutable
patterns.

Reviewers: hvr, bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #14569

Differential Revision: https://phabricator.haskell.org/D4261
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Distinguishing between "refutable" and "irrefutable" patterns
(as described by the Haskell Report) in incomplete pattern errors
was more confusing than helpful. Remove references to irrefutable
patterns.

Reviewers: hvr, bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #14569

Differential Revision: https://phabricator.haskell.org/D4261
</pre>
</div>
</content>
</entry>
<entry>
<title>Add custom exception for fixIO</title>
<updated>2017-11-02T17:20:26+00:00</updated>
<author>
<name>David Feuer</name>
<email>david.feuer@gmail.com</email>
</author>
<published>2017-11-02T16:06:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=b938576d151731b85314987fc550c17cfe824178'/>
<id>b938576d151731b85314987fc550c17cfe824178</id>
<content type='text'>
Traditionally, `fixIO f` throws `BlockedIndefinitelyOnMVar` if
`f` is strict. This is not particularly friendly, since the
`MVar` in question is just part of the way `fixIO` happens to be
implemented. Instead, throw a new `FixIOException` with a better
explanation of the problem.

Reviewers: austin, hvr, bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14356

Differential Revision: https://phabricator.haskell.org/D4113
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Traditionally, `fixIO f` throws `BlockedIndefinitelyOnMVar` if
`f` is strict. This is not particularly friendly, since the
`MVar` in question is just part of the way `fixIO` happens to be
implemented. Instead, throw a new `FixIOException` with a better
explanation of the problem.

Reviewers: austin, hvr, bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14356

Differential Revision: https://phabricator.haskell.org/D4113
</pre>
</div>
</content>
</entry>
<entry>
<title>Change catch# demand signature</title>
<updated>2017-03-01T06:14:14+00:00</updated>
<author>
<name>David Feuer</name>
<email>david.feuer@gmail.com</email>
</author>
<published>2017-03-01T06:14:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=701256df88c61a2eee4cf00a59e61ef76a57b4b4'/>
<id>701256df88c61a2eee4cf00a59e61ef76a57b4b4</id>
<content type='text'>
* Give `catch#` a lazy demand signature, to make it more honest.

* Make `catchException` and `catchAny` force their arguments so they
actually behave as advertised.

* Use `catch` rather than `catchException` in `forkIO`, `forkOn`, and
`forkOS` to avoid losing exceptions.

Fixes #13330

Reviewers: rwbarton, simonpj, simonmar, bgamari, hvr, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3244
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Give `catch#` a lazy demand signature, to make it more honest.

* Make `catchException` and `catchAny` force their arguments so they
actually behave as advertised.

* Use `catch` rather than `catchException` in `forkIO`, `forkOn`, and
`forkOS` to avoid losing exceptions.

Fixes #13330

Reviewers: rwbarton, simonpj, simonmar, bgamari, hvr, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3244
</pre>
</div>
</content>
</entry>
<entry>
<title>Overhaul of Compact Regions (#12455)</title>
<updated>2016-12-07T10:59:35+00:00</updated>
<author>
<name>Simon Marlow</name>
<email>marlowsd@gmail.com</email>
</author>
<published>2016-07-29T13:11:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=7036fde9df61b6eae9719c7f6c656778c756bec9'/>
<id>7036fde9df61b6eae9719c7f6c656778c756bec9</id>
<content type='text'>
Summary:
This commit makes various improvements and addresses some issues with
Compact Regions (aka Compact Normal Forms).

This was the most important thing I wanted to fix.  Compaction
previously prevented GC from running until it was complete, which
would be a problem in a multicore setting.  Now, we compact using a
hand-written Cmm routine that can be interrupted at any point.  When a
GC is triggered during a sharing-enabled compaction, the GC has to
traverse and update the hash table, so this hash table is now stored
in the StgCompactNFData object.

Previously, compaction consisted of a deepseq using the NFData class,
followed by a traversal in C code to copy the data.  This is now done
in a single pass with hand-written Cmm (see rts/Compact.cmm). We no
longer use the NFData instances, instead the Cmm routine evaluates
components directly as it compacts.

The new compaction is about 50% faster than the old one with no
sharing, and a little faster on average with sharing (the cost of the
hash table dominates when we're doing sharing).

Static objects that don't (transitively) refer to any CAFs don't need
to be copied into the compact region.  In particular this means we
often avoid copying Char values and small Int values, because these
are static closures in the runtime.

Each Compact# object can support a single compactAdd# operation at any
given time, so the Data.Compact library now enforces mutual exclusion
using an MVar stored in the Compact object.

We now get exceptions rather than killing everything with a barf()
when we encounter an object that cannot be compacted (a function, or a
mutable object).  We now also detect pinned objects, which can't be
compacted either.

The Data.Compact API has been refactored and cleaned up.  A new
compactSize operation returns the size (in bytes) of the compact
object.

Most of the documentation is in the Haddock docs for the compact
library, which I've expanded and improved here.

Various comments in the code have been improved, especially the main
Note [Compact Normal Forms] in rts/sm/CNF.c.

I've added a few tests, and expanded a few of the tests that were
there.  We now also run the tests with GHCi, and in a new test way
that enables sanity checking (+RTS -DS).

There's a benchmark in libraries/compact/tests/compact_bench.hs for
measuring compaction speed and comparing sharing vs. no sharing.

The field totalDataW in StgCompactNFData was unnecessary.

Test Plan:
* new unit tests
* validate
* tested manually that we can compact Data.Aeson data

Reviewers: gcampax, bgamari, ezyang, austin, niteria, hvr, erikd

Subscribers: thomie, simonpj

Differential Revision: https://phabricator.haskell.org/D2751

GHC Trac Issues: #12455
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This commit makes various improvements and addresses some issues with
Compact Regions (aka Compact Normal Forms).

This was the most important thing I wanted to fix.  Compaction
previously prevented GC from running until it was complete, which
would be a problem in a multicore setting.  Now, we compact using a
hand-written Cmm routine that can be interrupted at any point.  When a
GC is triggered during a sharing-enabled compaction, the GC has to
traverse and update the hash table, so this hash table is now stored
in the StgCompactNFData object.

Previously, compaction consisted of a deepseq using the NFData class,
followed by a traversal in C code to copy the data.  This is now done
in a single pass with hand-written Cmm (see rts/Compact.cmm). We no
longer use the NFData instances, instead the Cmm routine evaluates
components directly as it compacts.

The new compaction is about 50% faster than the old one with no
sharing, and a little faster on average with sharing (the cost of the
hash table dominates when we're doing sharing).

Static objects that don't (transitively) refer to any CAFs don't need
to be copied into the compact region.  In particular this means we
often avoid copying Char values and small Int values, because these
are static closures in the runtime.

Each Compact# object can support a single compactAdd# operation at any
given time, so the Data.Compact library now enforces mutual exclusion
using an MVar stored in the Compact object.

We now get exceptions rather than killing everything with a barf()
when we encounter an object that cannot be compacted (a function, or a
mutable object).  We now also detect pinned objects, which can't be
compacted either.

The Data.Compact API has been refactored and cleaned up.  A new
compactSize operation returns the size (in bytes) of the compact
object.

Most of the documentation is in the Haddock docs for the compact
library, which I've expanded and improved here.

Various comments in the code have been improved, especially the main
Note [Compact Normal Forms] in rts/sm/CNF.c.

I've added a few tests, and expanded a few of the tests that were
there.  We now also run the tests with GHCi, and in a new test way
that enables sanity checking (+RTS -DS).

There's a benchmark in libraries/compact/tests/compact_bench.hs for
measuring compaction speed and comparing sharing vs. no sharing.

The field totalDataW in StgCompactNFData was unnecessary.

Test Plan:
* new unit tests
* validate
* tested manually that we can compact Data.Aeson data

Reviewers: gcampax, bgamari, ezyang, austin, niteria, hvr, erikd

Subscribers: thomie, simonpj

Differential Revision: https://phabricator.haskell.org/D2751

GHC Trac Issues: #12455
</pre>
</div>
</content>
</entry>
<entry>
<title>Add @since annotations to base instances</title>
<updated>2016-06-06T13:07:18+00:00</updated>
<author>
<name>Seraphime Kirkovski</name>
<email>kirkseraph@gmail.com</email>
</author>
<published>2016-06-06T10:29:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=a90085bd45239fffd65c01c24752a9bbcef346f1'/>
<id>a90085bd45239fffd65c01c24752a9bbcef346f1</id>
<content type='text'>
Add @since annotations to instances in `base`.

Test Plan:
 * ./validate  # some commets shouldn't break the build
 * review the annotations for absurdities.

Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari

Reviewed By: RyanGlScott, hvr, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2277

GHC Trac Issues: #11767
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add @since annotations to instances in `base`.

Test Plan:
 * ./validate  # some commets shouldn't break the build
 * review the annotations for absurdities.

Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari

Reviewed By: RyanGlScott, hvr, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2277

GHC Trac Issues: #11767
</pre>
</div>
</content>
</entry>
<entry>
<title>Make `catch` lazy in the action</title>
<updated>2016-03-11T12:20:16+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>bgamari.foss@gmail.com</email>
</author>
<published>2016-03-11T09:38:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haskell.git/commit/?id=30ee9102db2f16894912e19b9d16156824611bbb'/>
<id>30ee9102db2f16894912e19b9d16156824611bbb</id>
<content type='text'>
Previously
```lang=haskell
catch (error "uh oh") (\(_ :: SomeException) -&gt; print "it failed")
```
would unexpectedly fail with "uh oh" instead of the handler being run
due to the strictness of `catch` in its first argument. See #11555 for
details.

Test Plan: Validate

Reviewers: austin, hvr, simonpj

Reviewed By: simonpj

Subscribers: simonpj, thomie

Differential Revision: https://phabricator.haskell.org/D1973

GHC Trac Issues: #11555
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously
```lang=haskell
catch (error "uh oh") (\(_ :: SomeException) -&gt; print "it failed")
```
would unexpectedly fail with "uh oh" instead of the handler being run
due to the strictness of `catch` in its first argument. See #11555 for
details.

Test Plan: Validate

Reviewers: austin, hvr, simonpj

Reviewed By: simonpj

Subscribers: simonpj, thomie

Differential Revision: https://phabricator.haskell.org/D1973

GHC Trac Issues: #11555
</pre>
</div>
</content>
</entry>
</feed>
