Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

GHC calls an unambiguous record update ambiguous
Inspired by https://github.com/haskell/error-messages/issues/57 Here is the example: ```hs data R = MkR1 { foo :: Int } | MkR2 { bar :: Int } data S = MkS { foo :: Int, bar :: Int } blah x = x { foo = 5, bar = 6 } ``` GHC says ``` Scratch.hs:37:10: error: * Record update is ambiguous, and requires a type signature * In the expression: x {foo = 5, bar = 6} In an equation for `blah': blah x = x {foo = 5, bar = 6} | 37 | blah x = x { foo = 5, bar = 6 } | ^^^^^^^^^^^^^^^^^^^^^^ ``` But it's not ambiguous. GHC rightly rejects that record-update if I write `blah :: R -> R` as a type signature, because `foo` and `bar` are in different constructors. In the record-update ambiguity check, GHC should take constructor choice into account.
issue