Certain special types are builtin, or are defined in the Mercury library:
char, int, float, string.int, float,
and string. (For char, the standard syntax suffices.)
pred, pred(T), pred(T1, T2), ...(func) = T, func(T1) = T,func(T1, T2) = T, ...{}, {T}, {T1, T2}, .... :- type {Arg1, Arg2, ..., ArgN}
---> { {Arg1, Arg2, ..., ArgN} }.
univ.univ is defined in the standard library module univ,
along with the predicates type_to_univ/2 and univ_to_type/2.
With those predicates, any type can be converted to the universal type
and back again.
The universal type is useful for situations
where you need heterogeneous collections.
io.state.io.state is defined in the standard library module io,
and represents the state of the world.
Predicates which perform I/O are passed the old state of the world
and produce a new state of the world.
In this way, we can give a declarative semantics to code that performs I/O.