goal_source_info/3
goal_source_info(
+AGoal,
-Goal,
-SourceInfo)
Decompose the AGoal annotated goal into a Goal proper and the SourceInfo descriptor term, indicating the source position of the goal.
Annotated goals occur in most of error message terms, and
carry information on the Goal causing the error and its source
position. The SourceInfo term, retrieved by
goal_source_info/3
will be one of the following:
[]
fileref(
File,
Line)
clauseref(
File,
MFunc,
ClauseNo,
CallNo,
Line)
:
Name/
Arity, calls are numbered
textually and the virtual line number shows the position of the
goal within the listing of the predicate MFunc, as
produced by listing/1
. Such a term is returned for
goals occurring in interpreted predicates, which do
not have “real” line number information, e.g. because they were
entered from the terminal, or created dynamically.
instantiation_error
type_error