Skip to content

Commit

Permalink
Remove old documentation on invariants (#451)
Browse files Browse the repository at this point in the history
The invariants are now documented in the haddocks for HashMap.
  • Loading branch information
sjakobi authored May 3, 2022
1 parent 70fdaa7 commit 9078dd5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Data/HashMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ instance NFData k => NFData1 (Leaf k) where
instance NFData2 Leaf where
liftRnf2 rnf1 rnf2 (L k v) = rnf1 k `seq` rnf2 v

-- Invariant: The length of the 1st argument to 'Full' is
-- 2^bitsPerSubkey

-- | A map from keys to values. A map cannot contain duplicate keys;
-- each key can map to at most one value.
data HashMap k v
Expand Down Expand Up @@ -423,9 +420,6 @@ instance Eq k => Eq1 (HashMap k) where
instance (Eq k, Eq v) => Eq (HashMap k v) where
(==) = equal1 (==)

-- We rely on there being no Empty constructors in the tree!
-- This ensures that two equal HashMaps will have the same
-- shape, modulo the order of entries in Collisions.
equal1 :: Eq k
=> (v -> v' -> Bool)
-> HashMap k v -> HashMap k v' -> Bool
Expand Down

0 comments on commit 9078dd5

Please sign in to comment.