Skip to content

Commit b32ada0

Browse files
Saizanalt-romes
authored andcommitted
runHDBServer parametrized by DebugRunner
- moved DAP-related code from executable `hdb` to public sublibrary `haskell-debugger:dap` so that runHDBServer can be imported in other packages. - refactored runDebugger to take a "DebugRunner" function whose responsibility is to provide a Ghc session and a way to load the debugee home units. - The in-memory:haskell-debugger-view unit is no longer compiled via `load` to avoid unloading the modules loaded by the DebugRunner. We rely on `compileOne` instead.
1 parent bb5a0f9 commit b32ada0

43 files changed

Lines changed: 890 additions & 690 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

haskell-debugger.cabal

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,9 @@ library
155155
hs-source-dirs: haskell-debugger
156156
default-language: GHC2021
157157

158-
executable hdb
158+
library dap
159159
import: warnings
160-
main-is: Main.hs
161-
other-modules: Development.Debug.Adapter.Breakpoints,
160+
exposed-modules: Development.Debug.Adapter.Breakpoints,
162161
Development.Debug.Adapter.Stepping,
163162
Development.Debug.Adapter.Stopped,
164163
Development.Debug.Adapter.Evaluation,
@@ -169,13 +168,46 @@ executable hdb
169168
Development.Debug.Adapter.Exit,
170169
Development.Debug.Adapter.Exit.Helpers,
171170
Development.Debug.Adapter.Handles,
171+
Development.Debug.Adapter.Server,
172172
Development.Debug.Adapter,
173173

174174
Development.Debug.Adapter.Proxy,
175175

176-
Development.Debug.Interactive,
177-
178176
Development.Debug.Session.Setup,
177+
hs-source-dirs: hdb-dap
178+
default-language: GHC2021
179+
default-extensions: CPP
180+
build-depends:
181+
base, ghc, ghci,
182+
exceptions, aeson, bytestring,
183+
containers, filepath,
184+
process, mtl,
185+
unordered-containers >= 0.2.19 && < 0.3,
186+
187+
haskell-debugger,
188+
hie-bios,
189+
prettyprinter ^>= 1.7.0,
190+
co-log-core >= 0.3.2.5 && < 0.4,
191+
implicit-hie ^>=0.1.4.0,
192+
transformers >= 0.6 && < 0.7,
193+
time,
194+
195+
directory >= 1.3.9 && < 1.4,
196+
network >= 3.2.8,
197+
network-run >= 0.4.4,
198+
async >= 2.2.5 && < 2.3,
199+
text >= 2.1 && < 2.3,
200+
dap >= 0.6 && < 0.7,
201+
202+
haskeline >= 0.8 && < 1,
203+
optparse-applicative >= 0.18 && < 0.20,
204+
uuid >= 1.3 && < 1.4,
205+
ghc-stack-annotations >=0.1 && <0.2,
206+
207+
executable hdb
208+
import: warnings
209+
main-is: Main.hs
210+
other-modules: Development.Debug.Interactive,
179211

180212
Development.Debug.Options,
181213
Development.Debug.Options.Parser,
@@ -190,6 +222,7 @@ executable hdb
190222
unordered-containers >= 0.2.19 && < 0.3,
191223

192224
haskell-debugger,
225+
haskell-debugger:dap,
193226
hie-bios,
194227
prettyprinter ^>= 1.7.0,
195228
co-log-core >= 0.3.2.5 && < 0.4,
@@ -202,7 +235,7 @@ executable hdb
202235
network-run >= 0.4.4,
203236
async >= 2.2.5 && < 2.3,
204237
text >= 2.1 && < 2.3,
205-
dap >= 0.5 && < 0.6,
238+
dap >= 0.6 && < 0.7,
206239

207240
haskeline >= 0.8 && < 1,
208241
optparse-applicative >= 0.18 && < 0.20,

0 commit comments

Comments
 (0)