Backpack doesn't work with DuplicateRecordFields
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.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |