Double dots in record update [GHC-70712]

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.

Examples

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.

DoubleDot.hs
Before
module DoubleDot where

data Record = Record {field :: Integer}

x = Record {field = 5}
y = x {field=8, ..}
After
module DoubleDot where

data Record = Record {field :: Integer}

x = Record {field = 5}
y = x {field=8}