From 8ea920f1ef9e66e3cecc81822e594943f8957d60 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 5 Jan 2007 17:38:51 +0000 Subject: [PATCH] This patch fixes ticket #1083 in the ghci debugger A module loaded under debugging mode but owning no breakpoints was erroneously identified by ghci as a non-under debugging module, producing a confusing error msg when the user tried to set a breakpoint The fix inserts an empty list of sites in the module-sites dictionary used by the debugger --- compiler/ghci/Debugger.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs index 75ad838..1608933 100644 --- a/compiler/ghci/Debugger.hs +++ b/compiler/ghci/Debugger.hs @@ -511,7 +511,7 @@ getSiteCoords bt a site -- addModule is dumb and inefficient, but it does the job --addModule fn siteCoords _ | trace ("addModule: " ++ moduleString (unsafeCoerce# fn) ++ " - " ++ show siteCoords) False = undefined -addModule a [] bt = bt +addModule a [] bt = bt {sites = Map.insert a [] (sites bt)} addModule a siteCoords bt | nrows <- maximum$ [i | (_,(i,j)) <- siteCoords ] , sitesByRow <- [ [(s,c) | (s,(r,c)) <- siteCoords, r==i] -- 1.7.10.4