+ 1 Primitives

Felix has a large set of data types lifted from C and C++. In general is lifted from C with a type binding in the library like this:

    type int = "int";

Polymorphic types can be lifted too:

    type vector[T] = "vector<?1>";

Felix requires all types to be first class, that is, to provide a default constructor, copy constructor, destructor, and assignment operator. Second class types can be represented by pointers.

+ 2 Scalar

  address, bool, char, string

+ 2.1 Integer

   tiny, short, int, long, vlong
   utiny, ushort, uint, ulong, uvlong
   ptrdiff, intmax, intptr
   size, uintmax , uintptr
   int8, int16, int32, int64
   uint8, uint16, uint32, uint64

+ 2.2 Float

  float, double, ldouble
  complex, dcomplex, lcomplex

+ 2.3 STL

Stl data types work with any C data type, or any Felix product thereof. They will not work with pointers to the Felix heap or any type containing them, since the Garbage Collector cannot see into STL data types.


+ 3 Nominal type constructors

Specify types by name. Felix provides struct and union types. Enum is a special case of a union.

+ 4 Structural types

Anonymous types. Felix provides unit, tuple, array, record, void, sum, variant, pointer, function type, and C-function types.

+ 5 Library types

+ 5.1 Arrays

Felix provides a structurally typed compile time fixed length array type, and the library provides

  • varray (run time bounded variable length array),
  • darray (unbounded variable length array),
  • sarray (unbounded sparse array),
  • bsarray (bounded sparse array), and
  • JudyLArray.

We also have carray, a pointer to an indeterminate number of elements.

+ 5.2 Other

  • sexpr (a tree structured based on Scheme S-expressions),
  • assoc_list (a list of pairs),
  • ralist (Okasaki's purely functional random access list),
  • strdict (a dictionary with string keys based on JudySLArray),
  • json (a tree based on JSON specification)