From 3d0ad8a75e9874e222e2e149b8914e2ed74af7b8 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 9 May 2007 13:24:24 +0000 Subject: [PATCH] eliminate a crash when trying to use :break on a compiled module (test: break007) --- compiler/ghci/InteractiveUI.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ] -- 1.7.10.4