| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Data.Ref.Linear.Borrow
Description
Synopsis
- data Ref a
- update :: forall (α :: Lifetime) (β :: Lifetime) a b. α >= β => (a %1 -> BO β (b, a)) %1 -> Mut α (Ref a) %1 -> BO β (b, Mut α (Ref a))
- modify :: forall (α :: Lifetime) (β :: Lifetime) a. α >= β => (a %1 -> a) %1 -> Mut α (Ref a) %1 -> BO β (Mut α (Ref a))
- swap :: forall (α :: Lifetime) (β :: Lifetime) a. α >= β => Mut α (Ref a) %1 -> Mut α (Ref a) %1 -> BO β (Mut α (Ref a), Mut α (Ref a))
- readShare :: forall (α :: Lifetime) (β :: Lifetime) a. α >= β => Share α (Ref a) %1 -> BO β (Ur (Share α a))
- copyRef :: forall a (α :: Lifetime) (β :: Lifetime) (k :: BorrowKind). (Copyable a, α >= β) => Borrow k α (Ref a) %1 -> BO β a
Documentation
Linearly owned mutable reference.
Instances
| LinearOnly (Ref a :: Type) Source # | |
Defined in Data.Ref.Linear Methods linearOnly :: LinearOnlyWitness (Ref a) Source # | |
| Consumable a => Consumable (Ref a) Source # | |
Defined in Data.Ref.Linear | |
| Dupable a => Dupable (Ref a) Source # | |
| Affine (Ref a) Source # | |
| Dupable a => Clone (Ref a) Source # | |
| Unsatisfiable ('ShowType (Ref a) ':<>: 'Text " cannot be copied!") => Copyable (Ref a) Source # | |
Defined in Data.Ref.Linear | |
update :: forall (α :: Lifetime) (β :: Lifetime) a b. α >= β => (a %1 -> BO β (b, a)) %1 -> Mut α (Ref a) %1 -> BO β (b, Mut α (Ref a)) Source #
modify :: forall (α :: Lifetime) (β :: Lifetime) a. α >= β => (a %1 -> a) %1 -> Mut α (Ref a) %1 -> BO β (Mut α (Ref a)) Source #
swap :: forall (α :: Lifetime) (β :: Lifetime) a. α >= β => Mut α (Ref a) %1 -> Mut α (Ref a) %1 -> BO β (Mut α (Ref a), Mut α (Ref a)) Source #