Regression using NamedFieldPuns with qualified field names
I found a regression where code using the NamedFieldPuns extension and qualified field names doesn't compile with GHC 8 rc2, where it did with GHC 7.10.
Minimal reproduction:
module Rec where
data Rec = Rec { f :: Integer }
--------------------
{-# LANGUAGE NamedFieldPuns #-}
module Main where
import Rec (Rec (Rec))
import qualified Rec
g :: Rec -> Integer
g (Rec { Rec.f }) = f
On GHC 8 this fails with:
Main.hs:6:10: error: Qualified name in binding position: Rec.f
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1-rc2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |