Qualified Do: Non-imported module leads to inaccurate error messages
Summary
When using QualifiedDo
, Ix.do
leads to inaccurate error messages when no module named Ix
is imported.
Example:
Steps to reproduce
{-# LANGUAGE QualifiedDo #-}
test = Ix.do
x <- someOperation "Test"
pure x
someOperation = undefined
Not in scope: ‘Ix.>>=’
NB: no module named ‘Ix’ is imported.
Expected behavior
Either the whole do-block or Ix.do
should have an error source span noting that Ix
is not imported.
Environment
- GHC version used: 9.6.2 and 9.4.6
Optional:
- Operating System and System Architecture: Linux hugin 6.4.10-arch1-1 #1 SMP PREEMPT_DYNAMIC