TypeInfo: Optional Type Specification Prototype

Share:

A prototype for a mechanism for specifying the types of parameters and the return value for an R function. This is meta-information that can be used to generate stubs for servers and various interfaces to these functions. Additionally, the arguments in a call to a typed function can be validated using the type specifications. We allow types to be specified as either i) by class name using either inheritance - is(x, className), or strict instance of - class(x) %in% className, or ii) a dynamic test given as an R expression which is evaluated at run-time. More precise information and interesting tests can be done via ii), but it is harder to use this information as meta-data as it requires more effort to interpret it and it is of course run-time information. It is typically more meaningful.

Author
Duncan Temple Lang Robert Gentleman (<rgentlem@fhcrc.org>)
Date of publication
None
Maintainer
Duncan Temple Lang <duncan@wald.ucdavis.edu>
License
BSD
Version
1.40.0

View on Bioconductor

Man pages

checkArgs
Validate the arguments in a call to a typed function.
checkReturnValue
Verify the return value from the function has the appropriate...
ClassNameOrExpression-class
Class "ClassNameOrExpression" to represent type information...
DynamicTypeTest-class
Class "DynamicTypeTest" for computed tests on objects.
hasParameterType
Functions to query existence of specific type information
IndependentTypeSpecification
Create separate type information for different parameters.
IndependentTypeSpecification-class
Class "TypeSpecification" and derived class
NamedTypeTest-class
Class "NamedTypeTest" and sub-classes for tests on class of...
paramNames
Compute the names of all the specified parameters in a...
ReturnTypeSpecification
Constructor for specifying information about only the return...
rewriteTypeCheck
Insert code to support type validation
showTypeInfo
Display information about argument types
SimultaneousTypeSpecification
Create type signature information governing parameters in a...
TypedSignature
Constructor for a TypedSignature object
TypedSignature-class
Class "TypedSignature" representing type information about...
typeInfo
Get or set type information for a function.

Files in this package

TypeInfo/DESCRIPTION
TypeInfo/NAMESPACE
TypeInfo/R
TypeInfo/R/Classes.S
TypeInfo/R/checkArgs.S
TypeInfo/R/print.S
TypeInfo/R/rewrite.S
TypeInfo/R/support.S
TypeInfo/Todo.html
TypeInfo/build
TypeInfo/build/vignette.rds
TypeInfo/inst
TypeInfo/inst/doc
TypeInfo/inst/doc/TypeInfoNews.R
TypeInfo/inst/doc/TypeInfoNews.Rnw
TypeInfo/inst/doc/TypeInfoNews.pdf
TypeInfo/man
TypeInfo/man/ClassNameOrExpression-class.Rd
TypeInfo/man/DynamicTypeTest-class.Rd
TypeInfo/man/IndependentTypeSpecification-class.Rd
TypeInfo/man/IndependentTypeSpecification.Rd
TypeInfo/man/NamedTypeTest-class.Rd
TypeInfo/man/ReturnTypeSpecification.Rd
TypeInfo/man/SimultaneousTypeSpecification.Rd
TypeInfo/man/TypedSignature-class.Rd
TypeInfo/man/TypedSignature.Rd
TypeInfo/man/checkArgs.Rd
TypeInfo/man/checkReturnValue.Rd
TypeInfo/man/hasParameterType.Rd
TypeInfo/man/paramNames.Rd
TypeInfo/man/rewriteTypeCheck.Rd
TypeInfo/man/showTypeInfo.Rd
TypeInfo/man/typeInfo.Rd
TypeInfo/tests
TypeInfo/tests/ReturnExperiments.S
TypeInfo/tests/aggregate.S
TypeInfo/tests/calls.S
TypeInfo/tests/check.S
TypeInfo/tests/copyEnv.R
TypeInfo/tests/copySubstitute.R
TypeInfo/tests/copySubstitute.S
TypeInfo/tests/degenerate.S
TypeInfo/tests/doubleEval.S
TypeInfo/tests/foo.S
TypeInfo/tests/independent.S
TypeInfo/tests/invisible.S
TypeInfo/tests/loop.S
TypeInfo/tests/match.arg.S
TypeInfo/tests/return.S
TypeInfo/tests/rewrite.S
TypeInfo/tests/rowQ.S
TypeInfo/tests/simple.S
TypeInfo/vignettes
TypeInfo/vignettes/Rnews.sty
TypeInfo/vignettes/TypeInfoNews.Rnw
TypeInfo/vignettes/TypeSpecificationConcept.tex
TypeInfo/vignettes/outline.html