diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-03-23 11:40:02 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-03-23 11:40:02 -0400 |
commit | d5577f44eaf3b9dfdfc77828038782bf818c176a (patch) | |
tree | 447d2163367ece2e2801376e35d06490cfff779c /libraries/base/changelog.md | |
parent | 034c32f6b8abd15eb9affca972844d3c6842af69 (diff) | |
download | haskell-d5577f44eaf3b9dfdfc77828038782bf818c176a.tar.gz |
Special-case record fields ending with hash when deriving Read
Summary:
In commit dbd81f7e86514498218572b9d978373b1699cc5b, a
regression was inadvertently introduced which caused derived `Read`
instances for record data types with fields ending in a `#` symbol
(using `MagicHash`) would no longer parse on valid output. This
is ultimately due to the same reasons as #5041, as we cannot parse
a field name like `foo#` as a single identifier. We fix this issue
by employing the same workaround as in #5041: first parse the
identifier name `foo`, then then symbol `#`.
This is accomplished by the new `readFieldHash` function in
`GHC.Read`. This will likely warrant a `base-4.11.1.0` release.
Test Plan: make test TEST=T14918
Reviewers: tdammers, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14918
Differential Revision: https://phabricator.haskell.org/D4502
Diffstat (limited to 'libraries/base/changelog.md')
-rw-r--r-- | libraries/base/changelog.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index 47fe01148d..16e183e6b2 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -9,6 +9,10 @@ * Add `Applicative` (for `K1`), `Semigroup` and `Monoid` instances in `GHC.Generics`. (#14849) +## 4.11.1.0 *TBA* + * Add the `readFieldHash` function to `GHC.Read` which behaves like + `readField`, but for a field that ends with a `#` symbol (#14918). + ## 4.11.0.0 *TBA* * Bundled with GHC 8.4.1 |