Remove srcSpanStartLine/srcSpanEndLine crash
authorsimonpj@microsoft.com <unknown>
Tue, 8 Aug 2006 12:32:11 +0000 (12:32 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 8 Aug 2006 12:32:11 +0000 (12:32 +0000)
commite944b32b8e8a88a52e22cb4daa0bdb4ebbb7793f
tree174c995766f851a4dfab6ef38829b95b57ae854f
parent60bbc36bdfb0bdecb044489b0a0e1bc675af2b0d
Remove srcSpanStartLine/srcSpanEndLine crash

srcSpanStartLine/srcSpanEndLine panic on UnhelpfulLoc. They should not
really be exported by SrcLoc at all, but unfortunately they are used in
Lexer.x, which knows enough to avoid the panic.

However the call in RnEnv didn't know, and the panic was triggered
by Template Haskell spliced code.  This patch fixes it by exporting
the predicate RnEnv wanted, namely isOneLineSpan.
compiler/basicTypes/SrcLoc.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnExpr.lhs