Support qualified self {-# SOURCE #-} import
The source import in this module is a no-op and has no legitimate use:
module A where
import {-# SOURCE #-} A
It's also tricky to support properly, see #10182 (closed). So we will disable it.
However, there is one mode of use which cannot be legitimately done in normal Haskell: a qualified source import:
module A where
import {-# SOURCE #-} qualified A as MyA
The intended semantics is that the boot entities defined in A.hs-boot are available under the qualification MyA.
Fixing #7672 (closed) would get us most of the way here, but there is one more step to avoid regressing #10182 (closed). So this just seems not worth fixing, unless someone really wants it.
(Note: regular self imports could also be supported this way, but it would be even more complicated to do, since we don't even know what OccNames to add provenances for.)
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | lowest |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |