Data.HashMap.Internal.Debug

unordered-containers-0.2.20: Efficient hashing-based container types

Safe Haskell | None
Language | Haskell2010

Data.HashMap.Internal.Debug

Description

# WARNING

This module is considered internal.

The Package Versioning Policy does not apply.

The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.

Authors importing this module are expected to track development closely.

# Description

Debugging utilities for `HashMap`s.

Synopsis

- valid :: Hashable k => HashMap k v -> Validity k
- data Validity k
  - = Invalid (Error k) SubHashPath
  - | Valid
- data Error k
  - = INV1_internal_Empty
  - | INV2_Bitmap_unexpected_1_bits !Bitmap
  - | INV3_bad_BitmapIndexed_size !Int
  - | INV4_bitmap_array_size_mismatch !Bitmap !Int
  - | INV5_BitmapIndexed_invalid_single_subtree
  - | INV6_misplaced_hash !Hash
  - | INV7_key_hash_mismatch k !Hash
  - | INV8_bad_Full_size !Int
  - | INV9_Collision_size !Int
  - | INV10_Collision_duplicate_key k !Hash
- type SubHash = Word
- data SubHashPath

# Documentation

valid :: Hashable k => HashMap k v -> Validity k #

data Validity k #

Constructors

Invalid (Error k) SubHashPath |
Valid |

#### Instances

Instances details

Monoid (Validity k) # |
Instance details Defined in Data.HashMap.Internal.Debug Methods mempty :: Validity k # mappend :: Validity k -> Validity k -> Validity k # mconcat :: [Validity k] -> Validity k #
Semigroup (Validity k) # |
Instance details Defined in Data.HashMap.Internal.Debug Methods (<>) :: Validity k -> Validity k -> Validity k # sconcat :: NonEmpty (Validity k) -> Validity k # stimes :: Integral b => b -> Validity k -> Validity k #
Show k => Show (Validity k) # |
Instance details Defined in Data.HashMap.Internal.Debug Methods showsPrec :: Int -> Validity k -> ShowS # show :: Validity k -> String # showList :: [Validity k] -> ShowS #
Eq k => Eq (Validity k) # |
Instance details Defined in Data.HashMap.Internal.Debug Methods (==) :: Validity k -> Validity k -> Bool # (/=) :: Validity k -> Validity k -> Bool #

data Error k #

An error corresponding to a broken invariant.

See `HashMap` for the documentation of the invariants.

Constructors

INV1_internal_Empty |
INV2_Bitmap_unexpected_1_bits !Bitmap |
INV3_bad_BitmapIndexed_size !Int |
INV4_bitmap_array_size_mismatch !Bitmap !Int |
INV5_BitmapIndexed_invalid_single_subtree |
INV6_misplaced_hash !Hash |
INV7_key_hash_mismatch k !Hash |
INV8_bad_Full_size !Int |
INV9_Collision_size !Int |
INV10_Collision_duplicate_key k !Hash |

#### Instances

Instances details

Show k => Show (Error k) # |
Instance details Defined in Data.HashMap.Internal.Debug Methods showsPrec :: Int -> Error k -> ShowS # show :: Error k -> String # showList :: [Error k] -> ShowS #
Eq k => Eq (Error k) # |
Instance details Defined in Data.HashMap.Internal.Debug Methods (==) :: Error k -> Error k -> Bool # (/=) :: Error k -> Error k -> Bool #

type SubHash = Word #

A part of a `Hash` with `bitsPerSubkey` bits.

data SubHashPath #

#### Instances

Instances details

Show SubHashPath # |
Instance details Defined in Data.HashMap.Internal.Debug Methods showsPrec :: Int -> SubHashPath -> ShowS # show :: SubHashPath -> String # showList :: [SubHashPath] -> ShowS #
Eq SubHashPath # |
Instance details Defined in Data.HashMap.Internal.Debug Methods (==) :: SubHashPath -> SubHashPath -> Bool # (/=) :: SubHashPath -> SubHashPath -> Bool #