- (* goalname (params), tactic (params) etc. *)
- | ECall of id * expr list
- (* variable *)
- | EVar of id
- (* string with %-substitutions *)
- | EString of substs
- (* list *)
- | EList of expr list
+ | EGoalDefn of loc * goal
+ (** goal (params) = patterns : exprs code *)
+ | EFuncDefn of loc * func
+ (** function (params) = code *)
+ | EPredDefn of loc * pred
+ (** predicate (params) = code *)
+ | ECall of loc * id * expr list
+ (** call goal (params) or function (params) *)
+ | EPredCtor of loc * id * expr list
+ (** constructor is-predicate (params) *)
+ | EVar of loc * id
+ (** variable, or goal call with no parameters *)
+ | EList of loc * expr list
+ (** list *)
+ | ESubsts of loc * substs
+ (** string with %-substitutions *)
+ | EConstant of loc * constant
+ (** constant expression, such as a plain string, int, boolean, etc. *)
+and constant =
+ | CString of string
+and goal = param_decl list * pattern list * expr list * code option
+and func = param_decl list * returning * bool * code
+and pred = param_decl list * code
+and param_decl = id (** goal/func/pred parameter. *)