-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Efficient hash-consing for arbitrary data types -- -- Efficient hash-consing for arbitrary data types @package intern @version 0.1 module Data.Interned.Internal class (Eq (Description t), Hashable (Description t)) => Interned t where { data family Description t; type family Uninterned t; } describe :: Interned t => Uninterned t -> Description t unintern :: Interned t => t -> Uninterned t identify :: Interned t => Id t -> Uninterned t -> t identity :: Interned t => t -> Id t cache :: Interned t => Cache t mkCache :: Cache t newtype Cache t Cache :: MVar (CacheState t) -> Cache t getCache :: Cache t -> MVar (CacheState t) data CacheState t CacheState :: {-# UNPACK #-} !Id t -> (HashMap (Description t) (Weak t)) -> CacheState t newtype Id t Id :: Int -> Id t intern :: Interned t => Uninterned t -> t instance Eq (Id t) instance Ord (Id t) instance Show (Id t) instance Num (Id t) instance Real (Id t) instance Integral (Id t) instance Enum (Id t) instance Hashable (Id t) module Data.Interned class (Eq (Description t), Hashable (Description t)) => Interned t where { data family Description t; type family Uninterned t; } describe :: Interned t => Uninterned t -> Description t unintern :: Interned t => t -> Uninterned t identify :: Interned t => Id t -> Uninterned t -> t identity :: Interned t => t -> Id t cache :: Interned t => Cache t mkCache :: Cache t data Cache t newtype Id t Id :: Int -> Id t intern :: Interned t => Uninterned t -> t module Data.ByteString.Interned data InternedByteString instance Eq (Description InternedByteString) instance Hashable (Description InternedByteString) instance Interned InternedByteString instance Show InternedByteString instance Ord InternedByteString instance Eq InternedByteString instance IsString InternedByteString