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

Safe Haskell | None

Data.Interned

# Documentation

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

Associated Types

data Description t Source

type Uninterned t Source

Methods

describe :: Uninterned t -> Description tSource

identify :: Id -> Uninterned t -> tSource

seedIdentity :: p t -> Id Source

cacheWidth :: p t -> Int Source

modifyAdvice :: IO t -> IO tSource

cache :: Cache tSource

Instances

Interned IntSet |
Interned InternedByteString |
Interned InternedString |
Interned InternedText |

class Interned t => Uninternable t where Source

Methods

unintern :: t -> Uninterned tSource

Instances

Uninternable IntSet |
Uninternable InternedByteString |
Uninternable InternedString |
Uninternable InternedText |

mkCache :: Interned t => Cache tSource

data Cache t Source

cacheSize :: Cache t -> IO Int Source

type Id = Int Source

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