\documentclass{article}
\usepackage{modules}
\begin{document}
\begin{module}[id=ctest]
% a couple of symdefs to make the tests self-contained
\symdef{defint}[2]{\int_{#1}{#2}}
\symdef[bvar=1]{lamb}[2]{\lambda{#1}.{#2}}
\symdef{interval}[2]{[#1,#2]}
\symdef{csin}[1]{\prefix\sin{#1}}
\symdef{power}[2]{#1^{#2}}

\csymdef[bvars=4]{Defint}[4]{\int_{#1}^{#2}{#3}d{#4}}{\defint{\interval{#1}{#2}}{\lamb{#4}{#3}}}
Testing: $\Defint01{f(x)}{x}$ should look like $\int_0^1f(x)dx$.

Now, we make a notation definition for $\sin^2$, it should be invisible in {\LaTeX}, so the two plus characters should be next to each other. 
+\notationdef[1]{\power{\csin{#1}}2}{\prefix{\sin^2}{#1}}+

\end{module}
\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
