ilyakooo0 / airlock / Ur.Constructor

Different ways of constructing Noun from Elm types.

Primitive constructors

cell : Ur.Types.Noun -> Ur.Types.Noun -> Ur.Types.Noun

Constructs a Cell from two Nouns.

sig : Ur.Types.Noun

The sig value. Also known as ~.

It is equivalent to 0.

bytes : Bytes -> Ur.Types.Noun

Constructs an Atom from Bytes.

Integers

int : Basics.Int -> Ur.Types.Noun

Constructs an Atom from an unsigned 32-bit Int. If you pass something other than an unsigned 32-bit integer the behaviour is undefined.

signedInt : Basics.Int -> Ur.Types.Noun

Constructs an Atom from a signed Int.

bigint : BigInt -> Ur.Types.Noun

Constructs an Atom from a BigInt.

Floats

float32 : Basics.Float -> Ur.Types.Noun

Constructs an Atom from a 32-bit float.

float64 : Basics.Float -> Ur.Types.Noun

Constructs an Atom from a 64-bit float.

String

cord : String -> Ur.Types.Noun

Constructs a cord, knot or a term from a String.

tape : String -> Ur.Types.Noun

Constructs a tape from a String.

Higher-order constructors

listOf : (a -> Ur.Types.Noun) -> List a -> Ur.Types.Noun

Constructs a sig-terminated list.

The first argument is a constructor for the elements of the list.

The second argument is the list of values to encode.