Data.Linear.Alias.Internal
data Alias (m :: Type -> Type) a where Source #
A reference counted alias
Constructors
Fields
Function to free resource when the last alias is forgotten
The counter associated to this reference counted alias
The aliased resource
Defined in Data.Linear.Alias
Methods
forget :: Alias μ a %1 -> μ () Source #
share :: Alias μ a %1 -> m (Alias μ a, Alias μ a) Source #
Defined in Data.Linear.Alias.Internal
fields :: forall (a0 :: k). K1 i (Alias m a) a0 -> [SomeAlias] Source #
countedFields :: (Generic a, Fields (Rep a)) => a -> [SomeAlias] Source #
Return all reference counted (recursively nested) fields of a. These are not only Aliases directly, but all the recursively nested Aliases in a.
a
Aliases
Alias
data SomeAlias Source #
class Fields (rep :: k -> Type) where Source #
fields :: forall (a :: k). rep a -> [SomeAlias] Source #
fields :: forall (a :: k). U1 a -> [SomeAlias] Source #
fields :: forall (a :: k). V1 a -> [SomeAlias] Source #
fields :: forall (a0 :: k). (a :*: b) a0 -> [SomeAlias] Source #
fields :: forall (a0 :: k). (a :+: b) a0 -> [SomeAlias] Source #
fields :: forall (a :: k). M1 i c f a -> [SomeAlias] Source #