[GHC] #14487: Can't Hide Field When DuplicateRecordFields Is Enabled

GHC ghc-devs at haskell.org
Sun Nov 19 21:03:07 UTC 2017


#14487: Can't Hide Field When DuplicateRecordFields Is Enabled
-------------------------------------+-------------------------------------
           Reporter:  iansullivan88  |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  lowest         |         Milestone:
          Component:  Compiler       |           Version:  8.0.2
           Keywords:                 |  Operating System:  Linux
  DuplicateRecordFields              |
       Architecture:  x86_64         |   Type of failure:  GHC rejects
  (amd64)                            |  valid program
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 A.hs fails to compile when DuplicateRecordFields is enabled in B.hs.

 A.hs
 {{{#!hs
 module A where

 import           B hiding (duplicateName)

 test = X duplicateName

 duplicateName = 5

 }}}

 B.hs
 {{{#!hs
 {-# LANGUAGE DuplicateRecordFields #-}

 module B where

 data X = X {
     duplicateName :: Int
 }
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14487>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list