-- 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.3.0 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 identify :: Interned t => Id -> Uninterned t -> t identity :: Interned t => t -> Id cache :: Interned t => Cache t class Interned t => Uninternable t unintern :: Uninternable t => t -> Uninterned 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 -> !HashMap (Description t) (Weak t) -> CacheState t cacheSize :: Cache t -> IO Int type Id = Int intern :: Interned t => Uninterned t -> 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 identify :: Interned t => Id -> Uninterned t -> t identity :: Interned t => t -> Id cache :: Interned t => Cache t class Interned t => Uninternable t unintern :: Uninternable t => t -> Uninterned t mkCache :: Cache t data Cache t cacheSize :: Cache t -> IO Int type Id = Int intern :: Interned t => Uninterned t -> t module Data.ByteString.Interned.Internal data InternedByteString InternedByteString :: {-# UNPACK #-} !Id -> {-# UNPACK #-} !ByteString -> InternedByteString instance Eq (Description InternedByteString) instance Hashable (Description InternedByteString) instance Uninternable InternedByteString instance Interned InternedByteString instance Show InternedByteString instance Ord InternedByteString instance Eq InternedByteString instance IsString InternedByteString module Data.ByteString.Interned data InternedByteString InternedByteString :: {-# UNPACK #-} !Id -> {-# UNPACK #-} !ByteString -> InternedByteString module Data.String.Interned.Internal data InternedString IS :: {-# UNPACK #-} !Id -> String -> InternedString instance Eq (Description InternedString) instance Hashable (Description InternedString) instance Uninternable InternedString instance Interned InternedString instance Show InternedString instance Ord InternedString instance Eq InternedString instance IsString InternedString module Data.String.Interned data InternedString module Data.Text.Interned.Internal data InternedText InternedText :: {-# UNPACK #-} !Id -> {-# UNPACK #-} !Text -> InternedText instance Eq (Description InternedText) instance Hashable (Description InternedText) instance Uninternable InternedText instance Interned InternedText instance Show InternedText instance Ord InternedText instance Eq InternedText instance IsString InternedText module Data.Text.Interned data InternedText