Header menu logo testify

Mini Module

Types and nested modules

Type/Module Description

NumericLiteralN

Module for writing natural numbers with an "N" postfix (e.g 0N, 99N, ...)

Array<'a>

Bool

Char

Div

Double

EOF

Error

Exception

Int

Integer

Mod

Nat

The type Nat represents natural numbers starting at 0.

Panic

Read

String

Unit

Functions and values

Function or value Description

error s

Full Usage: error s

Parameters:
    s : string

Returns: 'T

raises an exception with the given error message

s : string
Returns: 'T

explode s

Full Usage: explode s

Parameters:
Returns: char list

Convert a string into a list of characters.

s : String
Returns: char list

getchar ()

Full Usage: getchar ()

Parameters:
    () : unit

Returns: char

reads a single character from the console

() : unit
Returns: char

getline ()

Full Usage: getline ()

Parameters:
    () : unit

Returns: string

Reads a line from the console. Raises an EOF exception if no more line is available.

() : unit
Returns: string

implode xs

Full Usage: implode xs

Parameters:
    xs : char list

Returns: string

Convert a list of characters into a string.

xs : char list
Returns: string

panic s

Full Usage: panic s

Parameters:
    s : string

Returns: 'T

simply panics

s : string
Returns: 'T

print a

Full Usage: print a

Parameters:
    a : 'T

writes a string to the console and starts a new line

a : 'T

putchar c

Full Usage: putchar c

Parameters:
    c : char

Outputs a single character to the console

c : char

putline s

Full Usage: putline s

Parameters:
    s : string

writes a string to the console and starts a new line

s : string

putstring s

Full Usage: putstring s

Parameters:
    s : string

writes a string to the console

s : string

readFromFile filepath

Full Usage: readFromFile filepath

Parameters:
Returns: string
filepath : String
Returns: string

readNat s

Full Usage: readNat s

Parameters:
Returns: Nat

Converts a string to a natural number. Raises a Read exception if the string is not formatted correctly.

s : String
Returns: Nat

show a

Full Usage: show a

Parameters:
    a : 'T

Returns: string

Converts a value to a string representation

a : 'T
Returns: string

writeToFile (filepath, contents)

Full Usage: writeToFile (filepath, contents)

Parameters:
filepath : String
contents : String

Type something to start searching.