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.
callable, must be nonvar
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:
The goal has no source information associated with it.
The goal occurs in file File, line Line.
The goal occurs in file File, within predicate
MFunc, clause number ClauseNo, call number
CallNo and virtual line number Line. Here, MFunc is of
Module: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
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.
Goal is uninstantiated
Goal is not a callable