Smarter generation of sized sets
Don't add/remove one element at a time. We know how many are missing/extra.
Don't add/remove one element at a time. We know how many are missing/extra.
else error ("Ran out of trys in fixSet: " ++ show trys)
help trys set = case compare (Set.size set) size of
EQ -> pure set
GT -> help (trys - 1) (Set.deleteMin set)
LT -> do a <- genA; help (trys - 1) (Set.insert a set)
GT -> help (trys - 1) (iterate Set.deleteMin set !! (Set.size set - size))
LT -> do
new <- Set.fromList <$> vectorOf (size - Set.size set) genA
help (trys - 1) (Set.union new set)
mapSized :: Ord a => Int -> Gen a -> Gen b -> Gen (Map a b)
mapSized size genA genB = setSized size genA >>= addRange
Adding Milkomeda Open Oracle dev guide
3815: Cleanup nix setup: remove unused cabal shell r=Unisay a=Unisay ### Overview This pull request cleans up our `flake.nix` configuration by * removing the unused `cabal-shell.nix` * making explicit which shell is created when doing `nix develop` (it's `….devShells.default`). ### Issue Number ADP-2447 Co-authored-by: Yura Lazarev <[email protected]>
fix CI not running on bors branches
5023: fix CI not running on bors branches r=disassembler a=dermetfan Looks like this was broken in #4930 as `prAndBorsIo` was added but not used. Also removed `nix` from the task name. I do not see what purpose it has and it makes the names unnecessarily long. Also we happen to need the old names in #5018. Co-authored-by: Robin Stumm <[email protected]>