hegg-0.1.0.0: Fast equality saturation in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Equality.Utils.IntToIntMap

Description

This module defines IntToIntMap, a variant of IntMap in which the values are fixed to Int.

We make use of this structure in ReprUnionFind to improve performance by a constant factor

Synopsis

Documentation

data IntToIntMap Source #

A map of integers to integers

Constructors

Nil

An empty IntToIntMap. Ideally this would be defined as a function instead of an exported constructor, but it's currently not possible to have top-level bindings for unlifted datatypes

type Key = Int# Source #

Key type synonym in an IntToIntMap

type Val = Int# Source #

Value type synonym in an IntToIntMap

find :: Key -> IntToIntMap -> Val Source #

Find the Val for a Key in an IntToIntMap

insert :: Key -> Val -> IntToIntMap -> IntToIntMap Source #

Insert a Val at a Key in an IntToIntMap

(!) :: IntToIntMap -> Key -> Val Source #

\(O(\min(n,W))\). Find the value at a key. Calls error when the element can not be found.

unliftedFoldr :: forall a {b :: TYPE ('BoxedRep 'Unlifted)}. (a -> b -> b) -> b -> [a] -> b Source #

A foldr in which the accumulator is unlifted