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

Strange requirement for re-exported duplicate record fields
In the following example, ```haskell module A(A(..)) where data A = A {x::Int} module B(B(..)) where data B = B {x::Bool} {-# LANGUAGE DuplicateRecordFields #-} module C(A(..),B(..)) where import A(A(..)) import B(B(..)) ``` I get an error about `conflicting exports for 'x'`. This doesn't seem right to me: I've got `-XDuplicateRecordFields` exactly where the duplicate occurs. However, I noticed that the if I move the pragma to A.hs, C.hs compiles without error: ```haskell {-# LANGUAGE DuplicateRecordFields #-} module A(A(..)) where data A = A {x::Int} module B(B(..)) where data B = B {x::Bool} module C(A(..),B(..)) where import A(A(..)) import B(B(..)) ``` This is bizarre because it is asymmetric (I arbitrarily put the pragma in A.hs, but it need not occur in B.hs), and because no duplicate records exist in module A, but they *do* exist in module C, where the pragma isn't needed. <details><summary>Trac metadata</summary> | Trac field | Value | | ---------------------- | ------------ | | Version | 8.0.2 | | Type | Bug | | TypeOfFailure | OtherFailure | | Priority | normal | | Resolution | Unresolved | | Component | Compiler | | Test case | | | Differential revisions | | | BlockedBy | | | Related | | | Blocking | | | CC | | | Operating system | | | Architecture | | </details> <!-- {"blocked_by":[],"summary":"Strange requirement for re-exported duplicate record fields","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In the following example, \r\n\r\n{{{\r\nmodule A(A(..)) where\r\ndata A = A {x::Int}\r\n\r\nmodule B(B(..)) where\r\ndata B = B {x::Bool}\r\n\r\n{-# LANGUAGE DuplicateRecordFields #-}\r\nmodule C(A(..),B(..)) where\r\nimport A(A(..))\r\nimport B(B(..))\r\n}}}\r\n\r\nI get an error about `conflicting exports for 'x'`. This doesn't seem right to me: I've got `-XDuplicateRecordFields` exactly where the duplicate occurs.\r\n\r\nHowever, I noticed that the if I move the pragma to A.hs, C.hs compiles without error:\r\n\r\n{{{\r\n{-# LANGUAGE DuplicateRecordFields #-}\r\nmodule A(A(..)) where\r\ndata A = A {x::Int}\r\n\r\nmodule B(B(..)) where\r\ndata B = B {x::Bool}\r\n\r\nmodule C(A(..),B(..)) where\r\nimport A(A(..))\r\nimport B(B(..))\r\n}}}\r\n\r\nThis is bizarre because it is asymmetric (I arbitrarily put the pragma in A.hs, but it need not occur in B.hs), and because no duplicate records exist in module A, but they ''do'' exist in module C, where the pragma isn't needed.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->
issue