dictionary-sharing-0.1.0.0: Sharing/memoization of class members

Safe HaskellNone
LanguageHaskell2010

Data.ClassSharing

Synopsis

Documentation

data Shared f a Source

newtype Shareable f a Source

Constructors

Shareable 

Fields

run :: Ref -> f a
 

share :: (Typeable a, Typeable f) => Shareable f a -> Shared f a Source

Share/memoize a class member of type f a.

unsafeAccess :: Shared f a -> Shareable f a Source

Should only be used to access class members. A safe wrapper should be defined for every shared class member. Direct access can lead to overriding class member definitions.

runShared :: Shared f a -> Ref -> f a Source

data DynMap Source

A dynamic map with type safe insertion and lookup.

Instances

class Typeable a

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#