caps

scala.caps
object caps

Attributes

Experimental
true
Source
caps.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
caps.type

Members list

Type members

Classlikes

trait CapSet

Carrier trait for capture set type parameters

Carrier trait for capture set type parameters

Attributes

Source
caps.scala
Supertypes
class Any
trait Capability

Attributes

Source
caps.scala
Supertypes
class Any
Known subtypes
trait Exists
trait Mutable
class CanThrow[E]
sealed trait Contains[+C >: CapSet <: CapSet, R <: Singleton]

A type constraint expressing that the capture set C needs to contain the capability R

A type constraint expressing that the capture set C needs to contain the capability R

Attributes

Source
caps.scala
Supertypes
class Object
trait Matchable
class Any
trait Mutable extends Capability

Attributes

Source
caps.scala
Supertypes
trait Capability
class Object
trait Matchable
class Any

Attributes

Source
caps.scala
Supertypes
trait Capability
class Object
trait Matchable
class Any
Known subtypes
class CanThrow[E]
final class consume extends StaticAnnotation

An annotations on parameters and update methods. On a parameter it states that any capabilties passed in the argument are no longer available afterwards, unless they are of class SharableCapabilitty. On an update method, it states that the this of the enclosing class is consumed, which means that any capabilities of the method prefix are no longer available afterwards.

An annotations on parameters and update methods. On a parameter it states that any capabilties passed in the argument are no longer available afterwards, unless they are of class SharableCapabilitty. On an update method, it states that the this of the enclosing class is consumed, which means that any capabilities of the method prefix are no longer available afterwards.

Attributes

Source
caps.scala
Supertypes
class Annotation
class Object
trait Matchable
class Any
final class refineOverride extends StaticAnnotation

An internal annotation placed on a refinement created by capture checking. Refinements with this annotation unconditionally override any info from the parent type, so no intersection needs to be formed. This could be useful for tracked parameters as well.

An internal annotation placed on a refinement created by capture checking. Refinements with this annotation unconditionally override any info from the parent type, so no intersection needs to be formed. This could be useful for tracked parameters as well.

Attributes

Source
caps.scala
Supertypes
class Annotation
class Object
trait Matchable
class Any
final class rootCapability extends StaticAnnotation

An annotation used internally for root capability wrappers of cap that represent either Fresh or Result capabilities. A capability is encoded as caps.cap @rootCapability(...) where rootCapability(...) is a special kind of annotation of type root.Annot that contains either a hidden set for Fresh instances or a method type binder for Result instances.

An annotation used internally for root capability wrappers of cap that represent either Fresh or Result capabilities. A capability is encoded as caps.cap @rootCapability(...) where rootCapability(...) is a special kind of annotation of type root.Annot that contains either a hidden set for Fresh instances or a method type binder for Result instances.

Attributes

Source
caps.scala
Supertypes
class Annotation
class Object
trait Matchable
class Any
object unsafe

Attributes

Source
caps.scala
Supertypes
class Object
trait Matchable
class Any
Self type
unsafe.type
final class untrackedCaptures extends StaticAnnotation

This should go into annotations. For now it is here, so that we can experiment with it quickly between minor releases

This should go into annotations. For now it is here, so that we can experiment with it quickly between minor releases

Attributes

Source
caps.scala
Supertypes
class Annotation
class Object
trait Matchable
class Any
final class use extends StaticAnnotation

An annotation on parameters x stating that the method's body makes use of the reach capability x*. Consequently, when calling the method we need to charge the deep capture set of the actual argiment to the environment.

An annotation on parameters x stating that the method's body makes use of the reach capability x*. Consequently, when calling the method we need to charge the deep capture set of the actual argiment to the environment.

Note: This should go into annotations. For now it is here, so that we can experiment with it quickly between minor releases

Attributes

Source
caps.scala
Supertypes
class Annotation
class Object
trait Matchable
class Any

Deprecated classlikes

sealed trait Exists extends Capability

A trait that used to allow expressing existential types. Replaced by root.Result instances.

A trait that used to allow expressing existential types. Replaced by root.Result instances.

Attributes

Deprecated
true
Source
caps.scala
Supertypes
trait Capability
class Object
trait Matchable
class Any

Deprecated types

type Cap = Capability

Attributes

Deprecated
Use `Capability` instead
Source
caps.scala

Value members

Concrete methods

def capsOf[CS >: CapSet <: CapSet]: Any

A wrapper indicating a type variable in a capture argument list of a

A wrapper indicating a type variable in a capture argument list of a

Attributes

Source
caps.scala

Concrete fields

The universal capture reference

The universal capture reference

Attributes

Source
caps.scala

Deprecated fields

val *: Capability

The universal capture reference (deprecated)

The universal capture reference (deprecated)

Attributes

Deprecated
Use `cap` instead
Source
caps.scala

Givens

Givens

given containsImpl[C >: CapSet <: CapSet, R <: Singleton]: containsImpl[C, R]

The only implementation of Contains. The constraint that {R} <: C is added separately by the capture checker.

The only implementation of Contains. The constraint that {R} <: C is added separately by the capture checker.

Attributes

Source
caps.scala

Extensions

Extensions

extension (x: Any)

Reach capabilities x* which appear as terms in @retains annotations are encoded as caps.reachCapability(x). When converted to CaptureRef types in capture sets they are represented as x.type @annotation.internal.reachCapability.

Reach capabilities x* which appear as terms in @retains annotations are encoded as caps.reachCapability(x). When converted to CaptureRef types in capture sets they are represented as x.type @annotation.internal.reachCapability.

Attributes

Source
caps.scala
extension (x: Any)

Read-only capabilities x.rd which appear as terms in @retains annotations are encoded as caps.readOnlyCapability(x). When converted to CaptureRef types in capture sets they are represented as x.type @annotation.internal.readOnlyCapability.

Read-only capabilities x.rd which appear as terms in @retains annotations are encoded as caps.readOnlyCapability(x). When converted to CaptureRef types in capture sets they are represented as x.type @annotation.internal.readOnlyCapability.

Attributes

Source
caps.scala