| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Control.Monad.Borrow.Pure.Lifetime.Token.Unsafe
Description
This module provides unsafe internals of Control.Monad.Borrow.Pure.Lifetime.Token. These are not meant to be used by end-users, so generally YOU SHOULD NOT import this module, and import Control.Monad.Borrow.Pure.Lifetime.Token instead.
This module is meant for library authors who want to build a new API on top of Pure Borrow.
This module provides internals of BO and Alias, which can break the soundness guarded by the role system.
We STRONGLY recommend to you to import only the needed parts of the definitions, and not to import everything or qualified.
Synopsis
- data Linearly = UnsafeLinearly
- class LinearOnly (a :: TYPE rep) where
- data LinearOnlyWitness (a :: k) = UnsafeLinearOnly
- data Now (α :: Lifetime) = UnsafeNow
- class End (α :: Lifetime) where
- data EndToken (α :: Lifetime) = UnsafeEnd
Documentation
Witness that the current computation is in a linear context.
Constructors
| UnsafeLinearly |
Instances
| Consumable Linearly Source # | |
| Dupable Linearly Source # | |
| LinearOnly Linearly Source # | |
Defined in Control.Monad.Borrow.Pure.Lifetime.Token.Internal Methods | |
class LinearOnly (a :: TYPE rep) where Source #
A (non-bottom) value of the type a can only live in a linear context.
Methods
Instances
| LinearOnly Linearly Source # | |
Defined in Control.Monad.Borrow.Pure.Lifetime.Token.Internal Methods | |
| LinearOnly (Now α :: Type) Source # | |
Defined in Control.Monad.Borrow.Pure.Lifetime.Token.Internal Methods linearOnly :: LinearOnlyWitness (Now α) Source # | |
| LinearOnly (Ref a :: Type) Source # | |
Defined in Data.Ref.Linear Methods linearOnly :: LinearOnlyWitness (Ref a) Source # | |
| LinearOnly (Vector a :: Type) Source # | |
Defined in Data.Vector.Mutable.Linear.Borrow Methods linearOnly :: LinearOnlyWitness (Vector a) Source # | |
| LinearOnly (Ref# a :: UnliftedType) Source # | |
Defined in Data.Ref.Linear.Unlifted Methods linearOnly :: LinearOnlyWitness (Ref# a) Source # | |
| bk ~ 'Mut => LinearOnly (Borrow bk α a :: Type) Source # | |
Defined in Control.Monad.Borrow.Pure.BO.Internal Methods linearOnly :: LinearOnlyWitness (Borrow bk α a) Source # | |
data LinearOnlyWitness (a :: k) Source #
Constructors
| UnsafeLinearOnly |
data Now (α :: Lifetime) Source #
Witness that the lifetime α is ongoing.
Constructors
| UnsafeNow |
Instances
| LinearOnly (Now α :: Type) Source # | |
Defined in Control.Monad.Borrow.Pure.Lifetime.Token.Internal Methods linearOnly :: LinearOnlyWitness (Now α) Source # | |
| Affine (Now α) Source # | |