std/core▲toc

std
core
bool

Standard boolstd/core/types/bool: V functions.

char

Standard charstd/core/types/char: V functions.

console

Standard output to the console.

debug

Core debugging functions.

delayed

Delayed computations.

either
exn

Standard exception (exnstd/core/exn/exn: (E, V) -> V) effect.

hnd

Internal effect handler primitives.

int

Standard integer intstd/core/types/int: V functions.

list

Standard liststd/core/types/list: V -> V functions.

maybe

Standard maybestd/core/types/maybe: V -> V functions.

order

Standard orderstd/core/types/order: V functions.

show

Standard show functions.

sslice

Efficient views on strings.

string

Standard stringstd/core/types/string: V functions.

tuple

Standard tuple functions.

types

Primitive types and functions.

vector

Standard vector functions.

Core functions.

This module is implicitly imported and all functions and types are always available. Some types and operations are required to be defined for the compiler to work correctly (i.e. types like exnstd/core/exn/exn: (E, V) -> V or liststd/core/types/list: V -> V).

effect blockingstd/core/blocking: X

The blockingstd/core/blocking: X effect signifies that a function may block.

effect fsysstd/core/fsys: X

The fsysstd/core/fsys: X effect signifies a function may access the file system.

type global-scopestd/core/global-scope: S

The global-scopestd/core/global-scope: S is a special type constant to denote the global scope.

alias iostd/core/io: E = <exnstd/core/exn/exn: (E, V) -> V,io-noexnstd/core/io-noexn: E>

The iostd/core/io: E effect is used for functions that perform arbitrary I/O operations.

alias io-noexnstd/core/io-noexn: E = <divstd/core/types/div: X,io-totalstd/core/io-total: E>

The io-noexnstd/core/io-noexn: E effect is used for functions that perform arbitrary I/O operations, but raise no exceptions.

alias io-totalstd/core/io-total: E = <ndetstd/core/types/ndet: X,consolestd/core/console/console: X,netstd/core/net: X,fsysstd/core/fsys: X,uistd/core/ui: X,ststd/core/types/st: H -> E<globalstd/core/types/global: H>>

The io-totalstd/core/io-total: E effect is used for functions that perform arbitrary I/O operations, but are terminating without raising exceptions.

effect netstd/core/net: X

The netstd/core/net: X effect signifies a function may access the network.

effect nmdstd/core/nmd: X

The named effect is the default umbrella effect for named effects.

alias purestd/core/pure: E = <exnstd/core/exn/exn: (E, V) -> V,divstd/core/types/div: X>

An alias for pure effects: a pure function always returns the same result when called with the same arguments but may not terminate or raise an exception.

effect scopestd/core/scope: S -> X<s>

The scopestd/core/scope: S -> X effect is used to ensure named effects cannot escape the scope of their handler.

cotype streamstd/core/stream: V -> V<a>

A streamstd/core/stream: V -> V is a co-inductive type representing an infinite list of elements.

con Next(head : atail : streamstd/core/stream: V -> V<a>)
fun stream/head( ^stream : streamstd/core/stream: V -> V<a> ) : a

Automatically generated. Retrieves the head constructor field of the streamstd/core/stream: V -> V type.

Automatically generated. Retrieves the tail constructor field of the streamstd/core/stream: V -> V type.

effect uistd/core/ui: X

The uistd/core/ui: X effect signifies a function may access the graphics system.

fun cmp/(==)( x : a, y : a, ?cmp : (a, a) -> orderstd/core/types/order: V ) : boolstd/core/types/bool: V

Generic equality if cmp exists.

fun range/fold( start : intstd/core/types/int: V, end : intstd/core/types/int: V, init : a, f : (intstd/core/types/int: V, a) -> e a ) : e a

Fold over the integers between [start,end] (including end).

fun range/fold-while( start : intstd/core/types/int: V, end : intstd/core/types/int: V, init : a, f : (intstd/core/types/int: V, a) -> e maybestd/core/types/maybe: V -> V<a> ) : e a

Fold over the integers between [start,end] (including end) or until f returns Nothingstd/core/types/Nothing: forall<a> maybe<a>.

fun range/for( ^start : intstd/core/types/int: V, end : intstd/core/types/int: V, action : (intstd/core/types/int: V) -> e () ) : e ()

Executes action for each integer from start to end (including end ). If start > end the function returns without any call to action .

fun range/for-while( start : intstd/core/types/int: V, end : intstd/core/types/int: V, action : (intstd/core/types/int: V) -> e maybestd/core/types/maybe: V -> V<a> ) : e maybestd/core/types/maybe: V -> V<a>

Executes action for each integer between start to end (including end ). If start > end the function returns without any call to action . If action returns Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>, the iteration is stopped and the result returned.

fun (!=)( x : a, y : a, ?(==) : (a, a) -> boolstd/core/types/bool: V ) : boolstd/core/types/bool: V

Generic inequality.

fun (<)( x : a, y : a, ?cmp : (a, a) -> orderstd/core/types/order: V ) : boolstd/core/types/bool: V

Generic lower than.

fun (<=)( x : a, y : a, ?cmp : (a, a) -> orderstd/core/types/order: V ) : boolstd/core/types/bool: V

Generic lower than or equal.

fun (>)( x : a, y : a, ?cmp : (a, a) -> orderstd/core/types/order: V ) : boolstd/core/types/bool: V

Generic greater than.

fun (>=)( x : a, y : a, ?cmp : (a, a) -> orderstd/core/types/order: V ) : boolstd/core/types/bool: V

Generic greater than or equal.

fun apply( f : (a) -> e b, x : a ) : e b

Apply a function f to a specified argument x.

fun const( default : a ) : ((x : b) -> a)

Return a ‘constant’ function that ignores its argument and always returns the same result.

fun fold( upto : intstd/core/types/int: V, init : a, f : (intstd/core/types/int: V, a) -> e a ) : e a

Fold over the integers between [0,upto) (excluding upto).

fun fold-while( n : intstd/core/types/int: V, init : a, f : (intstd/core/types/int: V, a) -> e maybestd/core/types/maybe: V -> V<a> ) : e a

Fold over the integers between [0,n) (excluding n) or until f returns Nothingstd/core/types/Nothing: forall<a> maybe<a>.

fun for( ^n : intstd/core/types/int: V, action : (intstd/core/types/int: V) -> e () ) : e ()

Executes action n times for each integer from 0 to malformed identifier: a dash must be preceded by a letter or digit, and followed by a letter. If n <= 0 the function returns without any call to action .

fun for-while( n : intstd/core/types/int: V, action : (intstd/core/types/int: V) -> e maybestd/core/types/maybe: V -> V<a> ) : e maybestd/core/types/maybe: V -> V<a>

Executes action for each integer between [0,n) (excluding n ). If n <= 0 the function returns without any call to action . If action returns Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>, the iteration is stopped and the result returned.

fun host(): ndetstd/core/types/ndet: X stringstd/core/types/string: V

Return the host environment: dotnet, browser, webworker, node, or libc.

fun ignore( x : a ) : ()

The ignorestd/core/ignore: forall<a> (x : a) -> () function ignores its argument.

fun main-console( main : () -> e a ) : e a

Used by the compiler to wrap main console applications.

fun o( f : (a) -> e b, g : (c) -> e a ) : ((x : c) -> e b)

Compose two functions f and g.

fun repeat( ^n : intstd/core/types/int: V, action : () -> e () ) : e ()

The repeat fun executes action n times.

fun same-type( x : a, y : a ) : a

Concise way to ensure two expressions have the same type.

fun unique(): ndetstd/core/types/ndet: X intstd/core/types/int: V

Returns a unique integer (modulo 32-bits).

fun while( predicate : () -> <divstd/core/types/div: X|e> boolstd/core/types/bool: V, action : () -> <divstd/core/types/div: X|e> () ) : <divstd/core/types/div: X|e> ()

The whilestd/core/while: forall<e> (predicate : () -> <div|e> bool, action : () -> <div|e> ()) -> <div|e> () fun executes action as long as pred is true.

private import std/core/undivstd/core/undiv, std/core/unsafestd/core/unsafe