pure-borrow
Safe HaskellNone
LanguageGHC2021

Data.Coerce.Directed.Unsafe

Description

This module exposes the unsafe internals of subtyping, which is only meant to be used for library implementors.

Documentation

class (a :: k) <: (b :: k1) where infix 4 Source #

Instances

Instances details
Coercible a b => (a :: k) <: (b :: k) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

GenericSubtype a b => (a :: Type) <: (Generically b :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

Coercible a b => (a :: Type) <: (AsCoercible b :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

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

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

a <: b => ([a] :: Type) <: ([b] :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

Methods

subtype :: SubtypeWitness [a] [b] Source #

(a <: a', b <: b') => (Either a b :: Type) <: (Either a' b' :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

Methods

subtype :: SubtypeWitness (Either a b) (Either a' b') Source #

(α >= β, a <: b) => (BO α a :: Type) <: (BO β b :: Type) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.BO.Internal

Methods

subtype :: SubtypeWitness (BO α a) (BO β b) Source #

(α <= β, a <: b) => (Lend α a :: Type) <: (Lend β b :: Type) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.BO.Internal

Methods

subtype :: SubtypeWitness (Lend α a) (Lend β b) Source #

(α >= β, a <: b, b <: a) => (Mut α a :: Type) <: (Mut β b :: Type) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.BO.Internal

Methods

subtype :: SubtypeWitness (Mut α a) (Mut β b) Source #

(α >= β, a <: b) => (Share α a :: Type) <: (Share β b :: Type) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.BO.Internal

Methods

subtype :: SubtypeWitness (Share α a) (Share β b) Source #

(α <= β, a <: b) => (After α a :: Type) <: (After β b :: Type) Source # 
Instance details

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

Methods

subtype :: SubtypeWitness (After α a) (After β b) Source #

(a <: a', b <: b') => ((a, b) :: Type) <: ((a', b') :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

Methods

subtype :: SubtypeWitness (a, b) (a', b') Source #

(a' <: a, b <: b', p <= q) => (a %p -> b :: Type) <: (a' %q -> b' :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

Methods

subtype :: SubtypeWitness (a %p -> b) (a' %q -> b') Source #

β <= α => (Borrows bk α xs :: Type) <: (Borrows bk' β xs :: Type) Source # 
Instance details

Defined in Control.Monad.Borrow.Pure.Experimental.Borrows

Methods

subtype :: SubtypeWitness (Borrows bk α xs) (Borrows bk' β xs) Source #

(a <: a', b <: b', c <: c') => ((a, b, c) :: Type) <: ((a', b', c') :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

Methods

subtype :: SubtypeWitness (a, b, c) (a', b', c') Source #

data SubtypeWitness (a :: k) (b :: k1) Source #

Constructors

UnsafeSubtype 

upcast :: a <: b => a %1 -> b Source #

newtype AsCoercible a Source #

Constructors

AsCoercible 

Fields

Instances

Instances details
Coercible a b => (a :: Type) <: (AsCoercible b :: Type) Source # 
Instance details

Defined in Data.Coerce.Directed.Internal

type GenericSubtype a b = (Generic a, Generic b, GSubtype (Rep a) (Rep b)) Source #

genericUpcast :: GenericSubtype a b => a %1 -> b Source #