From: Simon Marlow Date: Wed, 9 May 2007 13:24:24 +0000 (+0000) Subject: eliminate a crash when trying to use :break on a compiled module (test: break007) X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3d0ad8a75e9874e222e2e149b8914e2ed74af7b8;p=ghc-hetmet.git eliminate a crash when trying to use :break on a compiled module (test: break007) --- diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 4fb1ad3..5f9f74f 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -1793,7 +1793,7 @@ mkTickArray ticks [ (line, (nm,span)) | (nm,span) <- ticks, line <- srcSpanLines span ] where - max_line = maximum (map GHC.srcSpanEndLine (map snd ticks)) + max_line = foldr max 0 (map GHC.srcSpanEndLine (map snd ticks)) srcSpanLines span = [ GHC.srcSpanStartLine span .. GHC.srcSpanEndLine span ]