pure-borrow
Safe HaskellNone
LanguageGHC2021

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

Documentation

data Linearly Source #

Witness that the current computation is in a linear context.

Constructors

UnsafeLinearly 

class LinearOnly (a :: TYPE rep) where Source #

A (non-bottom) value of the type a can only live in a linear context.

data LinearOnlyWitness (a :: k) Source #

Constructors

UnsafeLinearOnly 

data Now (α :: Lifetime) Source #

Witness that the lifetime α is ongoing.

Constructors

UnsafeNow 

Instances

Instances details
LinearOnly (Now α :: Type) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.Lifetime.Token.Internal

Affine (Now α) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.Lifetime.Token.Internal

Methods

aff :: Now α %1 -> Aff (Now α) Source #

class End (α :: Lifetime) where Source #

Witness that the lifetime α has ended.

Methods

endToken :: EndToken α Source #

data EndToken (α :: Lifetime) Source #

Witness that the lifetime α has ended.

Constructors

UnsafeEnd 

Instances

Instances details
α >= β => (EndToken α :: Type) <: (EndToken β :: Type) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.Lifetime.Token.Internal