{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibjkahu4eetjn3netvlxxnynpfkcjnzx3ng47ikjw7wj4lkps4nuu",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mmwqnako2sf2"
},
"path": "/t/newcomer-help-wanted-in-the-haskell-debugger/14164#post_2",
"publishedAt": "2026-05-28T18:09:07.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"haskell-debugger:dap"
],
"textContent": "I’ll have a stab at the Stack installation angle.\n\nEDIT1: I tried (on Windows):\n\n\n > stack unpack haskell-debugger\n > cd haskell-debugger-0.13.1.0\n > # Create a stack.yaml file with a suitable snapshot (see below)\n > stack build\n\n\nwith `stack.yaml`:\n\n\n snapshot: nightly-2026-05-27 # GHC 9.12.4\n compiler: ghc-9.14.1 # GHC 9.14.1 or later is needed\n\n extra-deps:\n - dap-0.5.0.0@sha256:09f487806436461b0af84c15d82e4b74d361a4238480d8e80e8ade358a50f08e,2324\n - ghc-stack-annotations-0.1.0.0@sha256:56bdded7dc6a72ea338b96fdb9da1806c583bfdf3286aa9d092bf072d36bac21,1643\n - haskell-debugger-view-0.2.1.0@sha256:a6cad0c90bcc03be18b5435fc9222a9c97b3dc53b2b1c66c068ee5bfaa9af57e,1973\n\n\nGHC 9.14.1 could not compile module `GHC.Debugger.Monad`, failing with:\n\n\n haskell-debugger\\GHC\\Debugger\\Monad.hs:629:13: error: [GHC-83865]\n • Couldn't match expected type: IO ProcessHandle\n with actual type: Win32-2.14.2.1:System.Win32.DebugApi.Internal.PHANDLE\n -> IO ProcessHandle\n • Probable cause: ‘mkProcessHandle’ is applied to too few arguments\n In a stmt of a 'do' block:\n ph <- mkProcessHandle (fromIntegral pid) False\n In the expression:\n do bi_h <- socketToHandle sock ReadWriteMode\n pidLine <- annotateCallStackIO $ hGetLine bi_h\n pid <- case readMaybe pidLine :: Maybe Int of\n Just pid -> pure pid\n Nothing\n -> fail\n $ \"invalid external interpreter PID on socket: \" ++ show pidLine\n ph <- mkProcessHandle (fromIntegral pid) False\n ....\n In the third argument of ‘Control.Exception.bracketOnError’, namely\n ‘(\\ (sock, _)\n -> do bi_h <- socketToHandle sock ReadWriteMode\n pidLine <- annotateCallStackIO $ hGetLine bi_h\n pid <- case readMaybe pidLine :: Maybe Int of\n Just pid -> pure pid\n Nothing\n -> fail\n $ \"invalid external interpreter PID on socket: \" ++ show pidLine\n ....)’\n |\n 629 | ph <- mkProcessHandle (fromIntegral pid) False\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\nThat does not appear to be a Stack-related problem.\n\nEDIT2: I then looked at the GitHub repository, and tried:\n\n\n > git clone https://github.com/well-typed/haskell-debugger.git\n > cd haskell-debugger\n > # Edit the custom snapshot.yaml (see below)\n > stack -w stack-windows.yaml build\n\n\nusing `snapshot.yaml`:\n\n\n # A bespoke snapshot for GHC 9.14.1. There is no Stackage snapshot for\n # GHC 9.14.1.\n #\n # The relevant package versions in this snapshot are known, by testing, to work\n # together, not withstanding the upper bounds on dependencies specified in their\n # Cabal files.\n snapshot: nightly-2026-05-27 # GHC 9.12.4.\n compiler: ghc-9.14.1\n\n packages:\n - dap-0.7.0.0@sha256:4eb00ced16dfec6ed1ef4705db8c57a32b657978bcd773c06a027fcf15e4a8f6,2324\n - ghc-stack-annotations-0.1.0.0@sha256:56bdded7dc6a72ea338b96fdb9da1806c583bfdf3286aa9d092bf072d36bac21,1643\n\n\nThat failed during the build with:\n\n\n haskell-debugger > configure (lib + sub-lib + exe)\n haskell-debugger > Configuring haskell-debugger-0.13.1.0...\n haskell-debugger > Error: [Cabal-8010]\n haskell-debugger > Encountered missing or private dependencies:\n haskell-debugger > dap >=0.7 && <0.8 (missing)\n haskell-debugger >\n\n\nwhich I do not understand because:\n\n\n > stack -w stack-windows.yaml exec -- ghc-pkg list dap\n D:\\sr\\programs\\x86_64-windows\\ghc-9.14.1\\lib\\package.conf.d\n (no packages)\n D:\\sr\\snapshots\\0f13af98\\pkgdb\n dap-0.7.0.0\n\n D:\\Users\\mike\\Code\\Haskell\\haskell-debugger\\.stack-work\\install\\0f13af98\\pkgdb\n (no packages)\n\n\nshows that dap-0.7.0.0 is an installed package and (extract)\n\n\n stack -w stack-windows.yaml ls dependencies\n Cabal 3.16.0.0\n ...\n cryptohash-sha1 0.11.101.0\n data-fix 0.3.4\n ...\n zlib-clib 1.3.1\n\n\nappears to imply that `dap` is, in fact, not a direct or indirect dependency. So, I am puzzled …\n\nEDIT3: … but now, looking at `haskell-debugger.cabal`, `dap` is also a named private sub-library (an internal library). ~~However, it is not referenced as haskell-debugger:dap in the Cabal file, as I would expect.~~ Perhaps that is the source of the problem …\n\nEDIT4: If I rename the internal library in the Cabal file to be distinct from the name of a dependency package (`dap` → `hdb-dap`), Stack no longer falls over. (I don’t know if that reflects a Stack problem or a problem with the `Cabal` library that ships with GHC 9.14.1.) However, GHC 9.14.1 still cannot compile module `GHC.Debugger.Monad` - for what appears to be the same reason as above.",
"title": "Newcomer help wanted in the Haskell Debugger"
}