Created
April 8, 2019 05:54
-
-
Save snoyberg/ba7fdb3c678c35aa140ad33d135b8175 to your computer and use it in GitHub Desktop.
Help debugging the pantry lock bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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