$dwim_correct_goal(:Goal, +Bindings, -Corrected)- Correct a goal (normally typed by the user) in the `Do What I
Mean' sense. Ask the user to confirm if a unique correction can
be found.
- Errors
- -
existence_error(procedure, PI)
if the goal cannot be
corrected.
$find_predicate(:Spec, -PIs:list(pi)) is det- Unify `List' with a list of predicate indicators that match the
specification `Spec'. `Spec' is a term Name/Arity, a ``Head'',
or just an atom. The latter refers to all predicate of that name
with arbitrary arity. `Do What I Mean' correction is done. If
the requested module is `user' predicates residing in any module
will be considered matching.
- Errors
- -
existence_error(procedure, Spec)
if no matching predicate
can be found.
dwim_predicate(:Head, -NewHead) is nondet- Find a head that is in a `Do What I Mean' sence the same as `Head'.
backtracking produces more such predicates. If searches for:
- predicates with a similar name in an import module
- predicates in a similar module with the same name
- predicates in any module with the same name
$similar_module(:Goal, -DWIMGoal) is nondet- True if DWIMGoal exists and is, except from a typo in the
module specification, equivalent to Goal.