{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreib6u6ixkdkn4yv7elcd6ll4uprx7pcjnanftcmiy7loobtfz2uzvq",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mjv5frnxgy62"
  },
  "path": "/t/problems-using-stack-in-a-msys2-shell/13939#post_6",
  "publishedAt": "2026-04-19T22:06:19.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "The ‘temporary’ `ghc<hash>.exe` files are created by GHC itself. (For some reason, GHC does not clean them up (at least, not on Windows).)\n\nI don’t know why anything would be trying to access `C:\\WINDOWS\\Temp` on your machine. On my machine, in PowerShell (`TMP` is the same):\n\n\n    > dir Env:TEMP\n\n    Name                           Value\n    ----                           -----\n    TEMP                           C:\\Users\\mike\\AppData\\Local\\Temp\n\n\nand in the Stack-supplied MSYS2 shell (extracts only):\n\n\n    $ env\n    ...\n    MSYSTEM=MSYS\n    ...\n    ORIGINAL_TEMP=/c/Users/mike/AppData/Local/Temp\n    ...\n    STACK_ROOT=D:\\sr\n    ...\n    TEMP=/tmp\n    ...\n    ORIGINAL_TMP=/c/Users/mike/AppData/Local/Temp\n    ...\n    GHCUP_MSYS2_ENV=MINGW64\n    ...\n    TMP=/tmp\n    ...\n    GHCUP_MSYS2=D:\\sr\\programs\\x86_64-windows\\msys2-20240727\n    ...\n\n\nwhere the ‘actual’ path for `/` is:\n\n\n    $ cygpath -w /\n    D:\\sr\\programs\\x86_64-windows\\msys2-20240727\\\n\n\nExtra verbosity might reveal something. For full-fat verbosity (Stack’s, Cabal’s and GHC’s), command:\n\n\n    stack --verbose build --cabal-verbose --ghc-options=-v turtle\n\n\n(EDIT: `--ghc-options=-v4` is probably too verbose.)",
  "title": "Problems using Stack in a MSYS2 shell"
}