Skip to content

Commit

Permalink
Document GHC-70712
Browse files Browse the repository at this point in the history
Fixes #416
  • Loading branch information
david-christiansen committed Jun 15, 2022
1 parent f257850 commit 42604ee
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module DoubleDot where

data Record = Record {field :: Integer}

x = Record {field = 5}
y = x {field=8}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module DoubleDot where

data Record = Record {field :: Integer}

x = Record {field = 5}
y = x {field=8, ..}
15 changes: 15 additions & 0 deletions message-index/messages/GHC-70712/double-dot/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Double dots in record update
---

## Message
```
DoubleDot.hs:6:17: error: [GHC-70712]
You cannot use `..' in a record update
|
6 | y = x {field=8, ..}
| ^^
```

## Explanation
The double-dot syntax is not allowed as part of a record update. To fix the issue, remove the `..` from the record update.
8 changes: 8 additions & 0 deletions message-index/messages/GHC-70712/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Double dots in record update
summary: Double-dot syntax is not allowed in a record update.
severity: error
introduced: 9.6.1
---

The double-dot syntax, which is part of the `RecordWildCards` extension, is not allowed as part of a record update, whether the extension is turned on or not.

0 comments on commit 42604ee

Please sign in to comment.