diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2021-10-13 19:43:42 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-14 08:41:52 -0400 |
commit | 7f2ce0d6bc1404d6d91b3d8560efddc208f46a24 (patch) | |
tree | d0b39a5b6afb7a96635401ed2a51e7414f0654e0 /compiler/GHC/Runtime | |
parent | df016e4e74dbc9c0181b9fb28c29cec08a743ade (diff) | |
download | haskell-7f2ce0d6bc1404d6d91b3d8560efddc208f46a24.tar.gz |
Move BreakInfo into own module
while working on GHCi stuff, e.g. `GHC.Runtime.Eval.Types`, I observed a
fair amount of modules being recompiled that I didn’t expect to depend
on this, from byte code interpreters to linkers. Turns out that the
rather simple `BreakInfo` type is all these modules need from the
`GHC.Runtime.Eval.*` hierarchy, so by moving that into its own file we
make the dependency tree wider and shallower, which is probably worth
it.
Diffstat (limited to 'compiler/GHC/Runtime')
-rw-r--r-- | compiler/GHC/Runtime/Eval.hs | 1 | ||||
-rw-r--r-- | compiler/GHC/Runtime/Eval/Types.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/Runtime/Interpreter.hs | 2 |
3 files changed, 4 insertions, 9 deletions
diff --git a/compiler/GHC/Runtime/Eval.hs b/compiler/GHC/Runtime/Eval.hs index bceb9a4159..a4ddbbfd4a 100644 --- a/compiler/GHC/Runtime/Eval.hs +++ b/compiler/GHC/Runtime/Eval.hs @@ -106,6 +106,7 @@ import GHC.Types.SrcLoc import GHC.Types.Unique import GHC.Types.Unique.Supply import GHC.Types.TyThing +import GHC.Types.BreakInfo import GHC.Unit import GHC.Unit.Module.Graph diff --git a/compiler/GHC/Runtime/Eval/Types.hs b/compiler/GHC/Runtime/Eval/Types.hs index c72c5c89ff..5706c037de 100644 --- a/compiler/GHC/Runtime/Eval/Types.hs +++ b/compiler/GHC/Runtime/Eval/Types.hs @@ -8,8 +8,7 @@ module GHC.Runtime.Eval.Types ( Resume(..), History(..), ExecResult(..), - SingleStep(..), isStep, ExecOptions(..), - BreakInfo(..) + SingleStep(..), isStep, ExecOptions(..) ) where import GHC.Prelude @@ -19,7 +18,7 @@ import GHCi.Message (EvalExpr, ResumeContext) import GHC.Types.Id import GHC.Types.Name import GHC.Types.TyThing -import GHC.Unit.Module +import GHC.Types.BreakInfo import GHC.Types.Name.Reader import GHC.Types.SrcLoc import GHC.Utils.Exception @@ -54,11 +53,6 @@ data ExecResult , breakInfo :: Maybe BreakInfo } -data BreakInfo = BreakInfo - { breakInfo_module :: Module - , breakInfo_number :: Int - } - data Resume = Resume { resumeStmt :: String -- the original statement , resumeContext :: ForeignRef (ResumeContext [HValueRef]) diff --git a/compiler/GHC/Runtime/Interpreter.hs b/compiler/GHC/Runtime/Interpreter.hs index 7dcc5fcd82..29c5592299 100644 --- a/compiler/GHC/Runtime/Interpreter.hs +++ b/compiler/GHC/Runtime/Interpreter.hs @@ -66,7 +66,7 @@ import GHCi.Message import GHCi.RemoteTypes import GHCi.ResolvedBCO import GHCi.BreakArray (BreakArray) -import GHC.Runtime.Eval.Types(BreakInfo(..)) +import GHC.Types.BreakInfo (BreakInfo(..)) import GHC.ByteCode.Types import GHC.Linker.Types |