Revert cyclic computation of ranges (and ban `mdo` from this code base)
andreasabel opened this issue · comments
agda/src/full/Agda/Interaction/Imports.hs
Lines 133 to 146 in ee1b7be
This change in 2.6.3 caused the
SrcFile
component of ranges to be black holes during parsing, making stuff not Show
able and causing regression #7301.
This regression shows that playing with exotic language features like mdo
can lead to obscure termination bugs that are very hard to discover (the code that loops is fine, but the data it processes goes to Nirwana when you try to look at it).
I think we should find another solution to the mapping of ranges to files/modules, one that is robust and does not make debugging a mine field.
And then ban mdo
.
ATTN: @nad
Here's the only other use:
agda/src/full/Agda/TypeChecking/RecordPatterns.hs
Lines 687 to 693 in c563c5e
Here's the only other use:
Indeed, and this is dead code since we replaced the record pattern translation by some other implementation.