:- op(950,yfx,@).         

:- use_module(signature,[vars2atoms/1]).

s(VP@NP) --> np(NP),vp(VP).
np(john) --> [john].
np(mary) --> [mary].
tv(lambda(X,lambda(Y,love(Y,X)))) --> [loves], {vars2atoms(X),vars2atoms(Y)}.
iv(lambda(X,smoke(X))) --> [smokes], {vars2atoms(X)}.
iv(lambda(X,snore(X))) --> [snorts], {vars2atoms(X)}.
vp(TV@NP) --> tv(TV),np(NP).
vp(IV) --> iv(IV).


% This doesn't work!
np(exists(X,man(X))) --> [a,man], {vars2atoms(X)}.
