intern-0.9.2: Efficient hash-consing for arbitrary data types

Safe HaskellNone
LanguageHaskell98

Data.Interned.Internal

Documentation

class (Eq (Description t), Hashable (Description t)) => Interned t where #

Minimal complete definition

describe, identify, cache

Associated Types

data Description t #

type Uninterned t #

Methods

describe :: Uninterned t -> Description t #

identify :: Id -> Uninterned t -> t #

seedIdentity :: p t -> Id #

cacheWidth :: p t -> Int #

modifyAdvice :: IO t -> IO t #

cache :: Cache t #

Instances
Interned IntSet # 
Instance details

Defined in Data.Interned.IntSet

Associated Types

data Description IntSet :: * #

type Uninterned IntSet :: * #

Interned InternedByteString # 
Instance details

Defined in Data.Interned.Internal.ByteString

Interned InternedString # 
Instance details

Defined in Data.Interned.Internal.String

Associated Types

data Description InternedString :: * #

type Uninterned InternedString :: * #

Interned InternedText # 
Instance details

Defined in Data.Interned.Internal.Text

Associated Types

data Description InternedText :: * #

type Uninterned InternedText :: * #

newtype Cache t #

Constructors

Cache 

Fields

data CacheState t #

Constructors

CacheState 

Fields

type Id = Int #

intern :: Interned t => Uninterned t -> t #