More Built-In Types
Typed Scheme comes with a number of other types and type constructors, corresponding (mostly) to primitive types provided by PLT Scheme.
The base types represent primitive data
numberAny numberstrA stringsymbolA symbolbooleanEither#tor#fkeywordA PLT Scheme literal keywordtopAny value
The following constructors are parameteric in a single type argument
(Listof t)Homogenous lists oft(Vectorof t)Homogenous vectors oft(Option t)Eithertor#f
(cons s t)is the pair containingsas thecarandtas thecdr(dom ... -> rng)is the type of functions from the (possibly-empty) sequencedom ...to therngtype.(dom ... rst .. -> rng)is the type of functions from the (possibly-empty) sequencedom ...with an optional trailing sequence ofrstto therngtype. Note:..is a part of the syntax of these types.(U t ...)is the union of the typest ...(case-lambda fun-ty ...)is a function that behaves like all of thefun-tys. Thefun-tys must all be function types constructed with->.(t t1 t2 ...)is the instantiation of the parametric typetat typest1 t2 ...(pred t)is a predicate for typet(All (v ...) t)is a parameterization of typet, with type variablesv ...(values t ...)is the type of a sequence of multiple values, with typest .... This can only appear as the return type of a function.vwherevis a number, boolean or string, is the singleton type containing only that valueiwhereiis an identifier can be a reference to a type name or a type variable
Other types cannot be written by the programmer, but are used internally and may appear in error messages.
#<struct:n (t ...)>is the type of structures namednwith field typest. There may be multiple such types with the same printed representation.(mu n t)is a recursive type wherenis bound to the recursive type in the bodyt<n>is the printed representation of a reference to the type variablen