scala.caps
Members list
Type members
Classlikes
Base trait for classes that represent capabilities in the object-capability model.
Base trait for classes that represent capabilities in the object-capability model.
A capability is a value representing a permission, access right, resource or effect. Capabilities are typically passed to code as parameters; they should not be global objects. Often, they come with access restrictions such as scoped lifetimes or limited sharing.
An example is the Label class in scala.util.boundary. It represents a capability in the sense that it gives permission to break to the enclosing boundary represented by the Label. It has a scoped lifetime, since breaking to a Label after the associated boundary was exited gives a runtime exception.
Capability has a formal meaning when Capture Checking is turned on. But even without capture checking, extending this trait can be useful for documenting the intended purpose of a class.
Attributes
- Source
- package.scala
- Supertypes
-
class Any
- Known subtypes
-
trait ExclusiveCapabilitytrait Unscopedtrait Mutabletrait SharedCapabilitytrait Controlobject anyobject freshShow all
A marker trait for classifier capabilities that can appear in .only and .except qualifiers. Capability classes directly extending Classifier are treated as classifier capbilities.
A marker trait for classifier capabilities that can appear in .only and .except qualifiers. Capability classes directly extending Classifier are treated as classifier capbilities.
Classifier has a formal meaning when Capture Checking is turned on. It should not be used outside of capture checking.
Attributes
- Source
- package.scala
- Supertypes
- Known subtypes
Marker trait for capabilities that capture some continuation or return point in the stack. Examples are exceptions, labels, CanThrow or Async contexts.
Marker trait for capabilities that capture some continuation or return point in the stack. Examples are exceptions, labels, CanThrow or Async contexts.
Control has a formal meaning when Capture Checking is turned on.
Attributes
- Source
- package.scala
- Supertypes
-
trait SharedCapabilitytrait Classifiertrait Capabilityclass Objecttrait Matchableclass AnyShow all
- Known subtypes
A marker trait that declares that all inheriting classes are "pure" in the sense that their values retain no capabilities including capabilities needed to perform effects. This has formal meaning only under capture checking.
A marker trait that declares that all inheriting classes are "pure" in the sense that their values retain no capabilities including capabilities needed to perform effects. This has formal meaning only under capture checking.
NOTE: If an upper bound is Pure, we check that an argument conforms to it only in sources where capture checking is enabled. For instance,
would give an error only under capture checking. Pure is also dropped in upper bounds if it forms part of an &-type, or is under a type lambda.
Attributes
- Source
- Pure.scala
- Supertypes
-
class Any
- Known subtypes
-
class ofBooleanclass ofByteclass ofCharclass ofDoubleclass ofFloatclass ofIntclass ofLongclass ofShortclass ofUnitclass Rangeclass Exclusiveclass Inclusiveclass WrappedStringobject Nilobject Emptyclass SystemPropertiesclass ofBooleanclass ofByteclass ofCharclass ofDoubleclass ofFloatclass ofIntclass ofLongclass ofShortclass ofUnitclass StringBuilderclass DoubleAccumulatorclass IntAccumulatorclass LongAccumulatorobject ArraySeqobject ArraySeqobject UnrolledBufferobject SortedSetobject SortedSetobject SortedSetobject TreeSetobject PriorityQueueobject TreeSetobject HashSetobject LazyListIterableobject ListSetobject Setobject HashSetobject LinkedHashSetobject Iterableobject Iterableobject Setobject Iterableobject Setobject Iteratorobject LazyListobject Streamobject IndexedSeqobject LinearSeqobject Seqobject Bufferobject IndexedBufferobject IndexedSeqobject Seqobject IndexedSeqobject LinearSeqobject Seqobject Listobject Queueobject Vectorobject ArrayBufferobject ArrayDequeobject ListBufferobject Queueobject Stackobject AnyAccumulatorobject Viewclass BitSetclass BitSet1class BitSet2class BitSetNclass BitSettrait BitSetobject DeadlineIsOrderedobject DurationIsOrderedobject FiniteDurationIsOrderedtrait BigDecimalIsFractionalobject BigDecimalIsFractionaltrait DoubleIsFractionalobject DoubleIsFractionaltrait FloatIsFractionalobject FloatIsFractionaltrait BigDecimalAsIfIntegralobject BigDecimalAsIfIntegraltrait BigIntIsIntegralobject BigIntIsIntegraltrait ByteIsIntegralobject ByteIsIntegraltrait CharIsIntegralobject CharIsIntegraltrait IntIsIntegralobject IntIsIntegraltrait LongIsIntegralobject LongIsIntegraltrait ShortIsIntegralobject ShortIsIntegraltrait BigDecimalIsConflictedtrait BigDecimalOrderingobject BigDecimaltrait BigIntOrderingobject BigInttrait BooleanOrderingobject Booleantrait ByteOrderingobject Byteobject Inttrait CharOrderingobject Chartrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedDoubleOrderingobject TotalOrderingtrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedFloatOrderingobject TotalOrderingtrait IntOrderingtrait LongOrderingobject Longtrait ShortOrderingobject Shorttrait StringOrderingobject Stringtrait SymbolOrderingobject Symboltrait UnitOrderingobject Unitclass Enumerationobject RoundingModeShow all
- Self type
Marker trait for capabilities that can be safely shared in a concurrent context.
Marker trait for capabilities that can be safely shared in a concurrent context.
SharedCapability has a formal meaning when Capture Checking is turned on. During separation checking, shared capabilities are not taken into account.
Attributes
- Source
- package.scala
- Supertypes
- Known subtypes
Experimental classlikes
Carrier trait for capture set type parameters.
Carrier trait for capture set type parameters.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
class Any
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
Type parameters
- C
-
the capture set that must contain the capability
R - R
-
the singleton type of the capability that must be present in
C
Attributes
- Companion
- object
- Experimental
- true
- Source
- package.scala
- Supertypes
Marker trait for capabilities that should only be used by one concurrent process at a given time. For example, write-access to a shared mutable buffer.
Marker trait for capabilities that should only be used by one concurrent process at a given time. For example, write-access to a shared mutable buffer.
ExclusiveCapability has a formal meaning when Capture Checking is turned on. During separation checking, exclusive usage of marked capabilities will be enforced.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Known subtypes
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
trait Unscopedtrait Classifiertrait ExclusiveCapabilitytrait Capabilitytrait Statefulclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
Marker trait for classes that can consult and change the global program state. These classes typically contain mutable variables and/or update methods.
Marker trait for classes that are not subject to scoping restrictions of captured capabilities.
Marker trait for classes that are not subject to scoping restrictions of captured capabilities.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
trait Classifiertrait ExclusiveCapabilitytrait Capabilityclass Objecttrait Matchableclass AnyShow all
- Known subtypes
The universal capture reference.
The universal capture reference.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Self type
-
any.type
An annotation for definitions that are assumed to be accessible from code compiled under safe mode.
An annotation for definitions that are assumed to be accessible from code compiled under safe mode.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
trait ConstantAnnotationtrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
The universal result capture reference.
The universal result capture reference.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Self type
-
fresh.type
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Self type
-
internal.type
An annotation for definitions that should not be accessible from code compiled under safe mode.
An annotation for definitions that should not be accessible from code compiled under safe mode.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
trait ConstantAnnotationtrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Was an annotation on capset parameters C stating that the method's body does not have C in its use-set. C might be accessed under a box in the method or in the result type of the method. Now deprecated and with no effect.
Was an annotation on capset parameters C stating that the method's body does not have C in its use-set. C might be accessed under a box in the method or in the result type of the method. Now deprecated and with no effect.
Attributes
- Deprecated
- true
- Experimental
- true
- Source
- package.scala
- Supertypes
Value members
Experimental methods
A wrapper that strips all covariant capture sets from Mutable types in the result of pure operation op, turning them into immutable types. Array[?] is also included since it counts as a Mutable type for separation checking.
A wrapper that strips all covariant capture sets from Mutable types in the result of pure operation op, turning them into immutable types. Array[?] is also included since it counts as a Mutable type for separation checking.
Attributes
- Experimental
- true
- Source
- package.scala