Turn "ambiguous import" error into a panic
The "ambiguous import" error should never occur, as a lookup of a type or data constructor should never be ambiguous.
This is because a single module cannot export multiple Name
s with the same OccName
,
as per item (1) of Note [Exporting duplicate declarations] in GHC.Tc.Gen.Export
.
This code path was intended to handle duplicate record fields, but the rest of the code had since been refactored to handle those in a different way.
TODO:
-
Rebase on top of !10336 (closed). -
Remove the AmbiguousImport
error message constructor.