This project is mirrored from https://github.com/haskell/containers. Pull mirroring updated .
  1. 30 Jun, 2021 1 commit
  2. 28 Jun, 2021 6 commits
    • David Feuer's avatar
      Prepare for release · cde5e58b
      David Feuer authored
      cde5e58b
    • David Feuer's avatar
      Partially revert #670 · adfee37f
      David Feuer authored
      Bodigrim found a bug in the new `Ord` instance in #783. Put the
      old one one back.
      
      Fixes #783.
      adfee37f
    • Marcin Szamotulski's avatar
      Make Map's and Set's: foldr' & firends ' more strict · f00aa025
      Marcin Szamotulski authored
      * Map.foldr'
      * Map.foldl'
      * Map.foldrWithKey'
      * Map.foldlWithKey'
      * Set.foldr'
      * Set.foldl'
      
      They now evaluate intermediate results of the accumulator before
      appling the folding operator again.
      
      This patch contains tests based on `nothunks` library.
      
      Benchmark summary:
      
      Map old:
      ```
      benchmarking foldlWithKey' ...
      benchmarked foldlWithKey'
      time                 28.57 μs   (28.00 μs .. 29.35 μs)
                           0.991 R²   (0.979 R² .. 0.999 R²)
      mean                 28.43 μs   (28.12 μs .. 28.99 μs)
      std dev              1.358 μs   (729.0 ns .. 2.101 μs)
      variance introduced by outliers: 27% (moderately inflated)
      
      benchmarking foldrWithKey' ...
      benchmarked foldrWithKey'
      time                 80.25 ns   (79.45 ns .. 81.13 ns)
                           0.998 R²   (0.996 R² .. 0.999 R²)
      mean                 79.84 ns   (79.27 ns .. 80.68 ns)
      std dev              2.184 ns   (1.572 ns .. 2.921 ns)
      variance introduced by outliers: 11% (moderately inflated)
      ```
      
      Map new:
      ```
      benchmarking foldlWithKey' ...
      benchmarked foldlWithKey'
      time                 27.76 μs   (27.15 μs .. 28.34 μs)
                           0.996 R²   (0.992 R² .. 0.998 R²)
      mean                 27.08 μs   (26.84 μs .. 27.43 μs)
      std dev              964.2 ns   (720.7 ns .. 1.350 μs)
      variance introduced by outliers: 18% (moderately inflated)
      
      benchmarking foldrWithKey' ...
      benchmarked foldrWithKey'
      time                 74.02 ns   (73.01 ns .. 75.82 ns)
                           0.998 R²   (0.994 R² .. 1.000 R²)
      mean                 73.14 ns   (72.91 ns .. 73.80 ns)
      std dev              1.245 ns   (434.3 ps .. 2.625 ns)
      ```
      
      Set old:
      
      ```benchmarking member ...
      benchmarked member
      time                 237.1 μs   (231.5 μs .. 246.0 μs)
                           0.993 R²   (0.986 R² .. 0.999 R²)
      mean                 234.3 μs   (232.1 μs .. 238.0 μs)
      std dev              9.031 μs   (5.737 μs .. 15.46 μs)
      variance introduced by outliers: 20% (moderately inflated)
      ```
      
      Set new:
      ```
      benchmarking member ...
      benchmarked member
      time                 219.4 μs   (216.3 μs .. 222.6 μs)
                           0.999 R²   (0.997 R² .. 1.000 R²)
      mean                 221.3 μs   (219.3 μs .. 225.3 μs)
      std dev              10.25 μs   (5.408 μs .. 18.71 μs)
      variance introduced by outliers: 28% (moderately inflated)
      ```
      f00aa025
    • infinity0's avatar
      Fix map-strict-properties · 4d50a8dd
      infinity0 authored
      It was actually testing the lazy version
      4d50a8dd
    • infinity0's avatar
    • konsumlamm's avatar
      Fix formatting · afae4623
      konsumlamm authored
      afae4623
  3. 23 Jun, 2021 1 commit
  4. 21 Jun, 2021 1 commit
  5. 02 Jun, 2021 1 commit
  6. 02 Feb, 2021 1 commit
    • John Ericson's avatar
      Fix for `indexInt8OffAddr#` returning sized type in next GHC · 7fb91ca5
      John Ericson authored
      Here's how we fix this without CPP:
      
      In old GHC:
      
        I8# :: Int# -> Int8
        indexInt8OffAddr# :: Addr# -> Int# -> Int#
      
      In upcoming GHC 9.2:
      
        I8# :: Int8# -> Int8
        indexInt8OffAddr# :: Addr# -> Int# -> Int8#
      
      So the "GLB" interface is:
      
        exists alpha.
        I8# :: alpha -> Int8
        indexInt8OffAddr# :: Addr# -> Int# -> alpha
      
      We we write a program against that, eliminating the black-box `alpha`
      with `I8#` and then converting to `Int`.
      7fb91ca5
  7. 31 Jan, 2021 1 commit
  8. 24 Jan, 2021 2 commits
  9. 04 Jan, 2021 1 commit
  10. 21 Dec, 2020 1 commit
  11. 10 Dec, 2020 1 commit
  12. 13 Oct, 2020 2 commits
  13. 04 Oct, 2020 1 commit
    • Tom Ellis's avatar
      Note that adjust = alter . fmap in Haddock · a885c906
      Tom Ellis authored
      Proof:
      
      adjust satisfies
      
          adjust f k m = case lookup k m of
              Nothing -> m
              Just v  -> insert k (f v) m
      
      and alter satisfies
      
          lookup k (alter f k m) = f (lookup k m)
      
      so
      
          lookup k (adjust f k m)
          == case lookup k m of
                 Nothing -> lookup k m
                 Just v  -> lookup k (insert k (f v) m)
          == case lookup k m of
                 Nothing -> Nothing
                 Just v  -> Just (f v)
          == fmap f (lookup k m)
          == lookup k (alter (fmap f) k m)
          == lookup k ((alter . fmap) f k m)
      
      A function is defined by its arguments and a Map is defined by its
      lookups, so this suffices to prove that `adjust == alter . fmap`.
      a885c906
  14. 12 Sep, 2020 1 commit
  15. 11 Sep, 2020 1 commit
  16. 14 Aug, 2020 2 commits
  17. 21 Jul, 2020 1 commit
  18. 17 Jul, 2020 2 commits
  19. 15 Jul, 2020 3 commits
  20. 14 Jul, 2020 2 commits
  21. 19 Jun, 2020 1 commit
  22. 06 Jun, 2020 3 commits
  23. 04 Jun, 2020 1 commit
  24. 27 May, 2020 3 commits