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

Safe HaskellNone
LanguageHaskell98

Data.Interned

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 # 
Interned InternedByteString # 
Interned InternedString # 
Interned InternedText # 

data Cache t #

type Id = Int #

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