Skip to content

Instantly share code, notes, and snippets.

@snoyberg
Created April 8, 2019 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snoyberg/ba7fdb3c678c35aa140ad33d135b8175 to your computer and use it in GitHub Desktop.
Save snoyberg/ba7fdb3c678c35aa140ad33d135b8175 to your computer and use it in GitHub Desktop.
Help debugging the pantry lock bug
import RIO
import Pantry
import Path
data App = App SimpleApp PantryConfig
instance HasPantryConfig App where
pantryConfigL = lens (\(App _ pc) -> pc) undefined
instance HasLogFunc App where
logFuncL = (lens (\(App sa _) -> sa) undefined).logFuncL
main :: IO ()
main = runSimpleApp $ do
dir <- parseAbsDir "/Users/michael/Desktop/pantry-test"
withPantryConfig dir defaultHackageSecurityConfig HpackBundled 3 $ \pc -> do
env <- ask
runRIO (App env pc) $ replicateConcurrently_ 10 $ updateHackageIndex Nothing
#!/usr/bin/env bash
set -euxo pipefail
ghc Main.hs -threaded -fforce-recomp
./Main&
./Main&
./Main&
./Main&
./Main&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment