[GHC] #13323: Backpack doesn't work with DuplicateRecordFields

GHC ghc-devs at haskell.org
Thu Feb 23 05:18:35 UTC 2017


#13323: Backpack doesn't work with DuplicateRecordFields
-------------------------------------+-------------------------------------
           Reporter:  ezyang         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
  (Type checker)                     |
           Keywords:  backpack       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 With

 {{{
 {-# LANGUAGE DuplicateRecordFields #-}
 unit p where
     signature A where
         data A = A { foo :: Int }
         data B = B { foo :: Bool }
 }}}

 I get:

 {{{
 [1 of 1] Processing p
   [1 of 1] Compiling A[sig]           ( p/A.hsig, nothing )

 <no location info>: error:
     The identifier $sel:foo:A does not exist in the local signature.
     (Try adding it to the export list of the hsig file.)
 }}}

 This is happening because the "exports" test is checking only the children
 of AvailTC, and not the field labels. Should be an easy fix.

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


More information about the ghc-tickets mailing list