TypeSystem - A notion of type system

Synopsis

This part of SByC implements a TypeSystem abstraction. A type is simply collection of values. A type system is to generate and parse literals and to coerce from String values.

TypeSystem::Ruby::type_of(-125)
# => Fixnum

lit = TypeSystem::Ruby::to_literal(-125)
# => "-125"

TypeSystem::Ruby::parse_literal("-125")
# => -125

TypeSystem::Ruby::coerce('-125', Integer)
# => -125

Semantics

The Ruby type system

The TypeSystem::Ruby module implements the abstraction for common ruby types. The following types are recognized:

User defined types (say Foo and v.kind_of?(Foo)) are supported provided that they provide two methods