The types are atoms from the set: string, atom, var, integer, rational, float, breal, compound, handle, db_reference, goal.
Success:
type_of(X,T). (gives T=var).
type_of([1,2],T). (gives T=compound).
type_of([],atom).
type_of(#,atom).
type_of($,atom).
type_of(*,atom).
type_of(/,atom).
type_of(\,atom).
type_of("a",string).
type_of(1,integer).
type_of(123456789012345,integer).
type_of(1_3,rational).
type_of(1.0,float).
type_of(0.99__1.01,breal).
type_of(a(b),compound).
record(k, a), recorded(k, _, R), type_of(R, db_reference).
make_suspension(true,S), type_of(S, goal).
Fail:
type_of(2.0,integer).
type_of(2.0,float).
Error:
type_of(2,"atom"). (Error 5).