Declares that the type
constructor Type1 is smaller than the type constructor
Type2. The mapping are given by the arguments, i.e. if
AI == BJ then the I-th argument of Type1
corresponds to the J-th argument of Type2.
:- typeof +TypedTerm is +Type
Declares a type
for the given term. TypedTerm is of the form Name(Type1,...,TypeN), where Type and
TypeI are types. Type1,...,TypeN are the types
of the arguments and Type is the type of the result.
:- type +TypeConstructor.
Declares a type. TypeConstructor is
either of the form Name/Arity or of the form Name(A,B,...). It declares the existence of a type named
Name which have Arity arguments.
:- type +Type is +TermConstructorList.
Combinaison of type and typeof. Type is of the form Name(A,B,...) and +TermConstructorList is alist of
terms of the form Name(Type1,...,TypeN). The
declared type is Type. The result type is Type.
:- untyped +SpecOrSpecList.
Avoid to type check the
given terms. SpecOrSpecList
is a functor specification of the form Name/Arity,
or a list of such specifications. It causes TCLP to avoid to type
check these terms.
This will tell TCLP what the clauses look like.
Phrase is the phrase to cut into bodies and
heads. Location is the location of the phrase in the program
source. Heads is a list of triplets Head-HLocation-Type, where Head is a head of the
clause, HLocation is the location of Head in the program
source (one can use user:args_location/2 to find it) and Type is the type expected for the head of the clause. Bodies is a list of pairs Body-BLocation, where
Body is a body of the clause and BLocation is its
location. Condition is a goal executed when recognizing clauses.
E.g. (prolog directive ``:- Body''):
Same as tclp__define_clause(Phrase,Location,Heads,Bodies,true)
:- tclp__define_clause_op(+BinOp,+Type)
This
predicate is a shortcut of tclp__define_clause/5 for defining
binary clause operators such as ':-'/2. BinOp is the name of
the operator and Type is the type expected for the head of the
clause. E.g.
:- tclp__define_clause_op(':-',pred).
:- tclp__define_clause_op(+BinOp)
Same as tclp__define_clause_op(BinOp,pred)
:- tclp__executable(+Goal,+Condition)
Tells TCLP
that the goal Goal is a TCLP declaration if the goal
Condition succeeds. E.g. the op/3 directive:
Whenever TCLP encounters a TCLP declaration, it will handle it using
a hook defined via this predicate. Goal is the TCLP declaration,
Location is its location in the program source, Hook is the goal that will be executed by TCLP to handle the
declaration and Condition is a goal that must
succeed. E.g. the op/3 directive: