sTypeConstructors: Type constructors for types in the Rsymbolic type system

Description Usage Arguments Format Value See Also Examples

Description

These functions create types for the Rsymbolic type system, called sTypes from here on. These functions are used mostly in literal expressions denoting sTypes. st creates a base sType from a string. A base sType is a type without any further structure. Example include st("numeric"), st("character") or st("logical"). %->% creates a function sType, i.e. the type of function, from a vector of argument sTypes and a result sType. A function sType has domain and range containing its argument and result types. Every sType has a string field containing a unambiguous string representation that can serve as a hash table key. STypes can be checked for equality via identical. sObject is the root of the sType hierarchy, i.e. the most general type.

Usage

1
2
3
4
5
st(baseTypeName)

domainTypes %->% rangeType

sObject

Arguments

baseTypeName

The name of the base sType to create.

domainTypes

The domain sType of a function sType.

rangeType

The range sType of a function sType.

Format

1
2
3
4
List of 2
 $ base  : chr "sObject"
 $ string: chr "sObject"
 - attr(*, "class")= chr [1:3] "sBaseType" "sType" "character"

Value

The created sType.

See Also

sTypeInference

Examples

1
2
3
st("numeric")
list(st("numeric"), st("numeric")) \%->\% st("logical")
is.sType(st("logical"))


Search within the rgp package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.