Primitive Types

Koj offers these different primitive types:

Integer type

This type represents an integer value. It is represented by the identifier Int.

Floating point type

This type represents a floating point value. It is represented by the identifier Float.

Character type

This type represents a single character. It is represented by the identifier Char.

String type

This type represents a text string. It is represented by the identifier String.

For more info on these types, see literals

Unit type

This type represents the return type of a function returning no actual value. It is represented by the identifier Unit, and its only possible value is ().

Never type

This type is a type that has no value. It is represented by the identifier Never. It is used to type computations that do not return any value.