std.types

Modules

Definition of standard types separate from the prelude to allow primitives to use them

Types

type Bool = 
    | False
    | True

Bool represents a value which can only be True or False

type Option a = 
    | None
    | Some a

Option represents a value which may not exist.

type Result e t = 
    | Err e
    | Ok t

Result represents either success (Ok) or an error (Err)

type Ordering = 
    | LT
    | EQ
    | GT

Ordering represents the result of comparing two values