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 Source #

Minimal complete definition

describe, identify, cache

Associated Types

data Description t Source #

type Uninterned t Source #

Methods

describe :: Uninterned t -> Description t Source #

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

seedIdentity :: p t -> Id Source #

cacheWidth :: p t -> Int Source #

modifyAdvice :: IO t -> IO t Source #

cache :: Cache t Source #

Instances

Instances details
Interned IntSet Source # 
Instance details

Defined in Data.Interned.IntSet

Associated Types

data Description IntSet Source #

type Uninterned IntSet Source #

Interned InternedByteString Source # 
Instance details

Defined in Data.Interned.Internal.ByteString

Interned InternedString Source # 
Instance details

Defined in Data.Interned.Internal.String

Interned InternedText Source # 
Instance details

Defined in Data.Interned.Internal.Text

newtype Cache t Source #

Constructors

Cache 

Fields

data CacheState t Source #

Constructors

CacheState 

Fields

cacheSize :: Cache t -> IO Int Source #

type Id = Int Source #

recover :: Interned t => Description t -> IO (Maybe t) Source #