StructureKind ::= mclause | mpred | mtype(Targettype) | mfunc
There are sub-kind relationships like
:- subtype meta((X of mclause)) < meta((X of mpred)).
% X is a meta-construct variable
The special type goal can be used as a non-meta type in subtype relationships and is as a meta-type identical with meta((trmFull of mpred)).
:- pred assert(meta((trmFull of mclause))). % ^^^^^^^^^^^^^^^^^^^^^^^^^^ % clause :- pred retract(meta((trmFull of mclause))). % ^^^^^^^^^^^^^^^^^^^^^^^^^^ % clause :- pred retractall(meta((trmFull of mpred))). % ^^^^^^^^^^^^^^^^^^^^^^^^ % head :- pred map(meta((trmName(@T1,@T2) of mpred)), list(T1),list(T2)). % ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ % p: T1 × T2 :- pred sort(meta((trmName(@T,@T) of mpred)) , list(T),list(T)). % ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ % p: T1 × T2 :- pred foldl(meta((trmName(@T1,@T,@T1) of mpred)) , T1,list(T),@T2) with T1 =< T2. % ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ % p: T1 × T × T1
PREV: Case-study: Complex list structures |
NEXT: Meta-programming examples |