Commit 6d075f13 authored by Simon Marlow's avatar Simon Marlow
Browse files

more layering cleanup: BreakArray should come from GHC

parent 6a250480
...@@ -85,11 +85,6 @@ import Data.IORef ( IORef, readIORef, writeIORef ) ...@@ -85,11 +85,6 @@ import Data.IORef ( IORef, readIORef, writeIORef )
import System.Posix.Internals ( setNonBlockingFD ) import System.Posix.Internals ( setNonBlockingFD )
-- these are needed by the new ghci debugger
import ByteCodeLink (HValue)
import ByteCodeInstr (BreakInfo (..))
import BreakArray
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
ghciWelcomeMsg = ghciWelcomeMsg =
...@@ -1659,7 +1654,7 @@ mkTickArray ticks ...@@ -1659,7 +1654,7 @@ mkTickArray ticks
max_line = maximum (map srcSpanEndLine (map snd ticks)) max_line = maximum (map srcSpanEndLine (map snd ticks))
srcSpanLines span = [ srcSpanStartLine span .. srcSpanEndLine span ] srcSpanLines span = [ srcSpanStartLine span .. srcSpanEndLine span ]
getModBreak :: Module -> GHCi (BreakArray, Array Int SrcSpan) getModBreak :: Module -> GHCi (GHC.BreakArray, Array Int SrcSpan)
getModBreak mod = do getModBreak mod = do
session <- getSession session <- getSession
Just mod_info <- io $ GHC.getModuleInfo session mod Just mod_info <- io $ GHC.getModuleInfo session mod
...@@ -1672,10 +1667,10 @@ lookupModule :: Session -> String -> GHCi Module ...@@ -1672,10 +1667,10 @@ lookupModule :: Session -> String -> GHCi Module
lookupModule session modName lookupModule session modName
= io (GHC.findModule session (GHC.mkModuleName modName) Nothing) = io (GHC.findModule session (GHC.mkModuleName modName) Nothing)
setBreakFlag :: Bool -> BreakArray -> Int -> IO Bool setBreakFlag :: Bool -> GHC.BreakArray -> Int -> IO Bool
setBreakFlag toggle array index setBreakFlag toggle array index
| toggle = setBreakOn array index | toggle = GHC.setBreakOn array index
| otherwise = setBreakOff array index | otherwise = GHC.setBreakOff array index
{- these should probably go to the GHC API at some point -} {- these should probably go to the GHC API at some point -}
......
...@@ -87,6 +87,7 @@ module GHC ( ...@@ -87,6 +87,7 @@ module GHC (
obtainTerm, obtainTerm1, obtainTerm, obtainTerm1,
ModBreaks(..), BreakIndex, ModBreaks(..), BreakIndex,
BreakInfo(breakInfo_number, breakInfo_module), BreakInfo(breakInfo_number, breakInfo_module),
BreakArray, setBreakOn, setBreakOff, getBreak,
modInfoModBreaks, modInfoModBreaks,
#endif #endif
...@@ -198,6 +199,7 @@ import ByteCodeInstr ...@@ -198,6 +199,7 @@ import ByteCodeInstr
import DebuggerTys import DebuggerTys
import IdInfo import IdInfo
import HscMain ( hscParseIdentifier, hscTcExpr, hscKcType, hscStmt ) import HscMain ( hscParseIdentifier, hscTcExpr, hscKcType, hscStmt )
import BreakArray
#endif #endif
import Packages import Packages
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment