%%% Abstract syntax of the (untyped) lambda calculus
%%%
%%% AUTHOR: Gary T. Leavens
%%%
%%% #load "abstract_syntax.mod".
%%% #query abstract_syntax.

module abstract_syntax.

kind	term	type.

type	var	string -> term.
type	ap	term -> term -> term.
type	lambda	string -> term -> term.

type    unparse term -> string -> o.
unparse (var X) X.
unparse (ap M N) AS :-
	unparse M MS,
        unparse N NS,
	AS is "(" ^ MS ^ " " ^ NS ^ ")".
