Skip to content

DuplicateRecordFields extension not suggested in error message

Summary

When compiling a file with duplicate record fields the error message does not suggest using the DuplicateRecordFields language extension.

Steps to reproduce

$ echo 'data A = A {abc :: Int}\ndata B = B {abc :: Int}' > /tmp/dup.hs
$ ghc /tmp/dup.hs

## Expected behavior

```text
[1 of 1] Compiling Main             ( /tmp/dup.hs, /tmp/dup.o )

/tmp/dup.hs:2:13: error:
    Multiple declarations of ‘abc’
    Declared at: /tmp/dup.hs:1:13
                 /tmp/dup.hs:2:13
  |
2 | data B = B {abc :: Int}
  |  

Environment

  • GHC version used: 9.2.7

Optional:

  • Operating System: OpenBSD 7.4
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information