%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions in order to compile LaTeX documents generated by "currydoc --tex"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\currymodule}[1]{\subsection*{Module #1}}
\newcommand{\currytypesynstart}[2]{{\tt type #2}\pindex{#1} \begin{quote}}
\newcommand{\currytypesynstop}{\end{quote}}
\newcommand{\currydatastart}[1]{{\tt data #1}\pindex{#1} \begin{quote}}
\newcommand{\currynewtypestart}[1]{{\tt newtype #1}\pindex{#1} \begin{quote}}
\newcommand{\currydataconsstart}{\end{quote}%
\begin{itemize}\item[] \hspace{-4ex}\emph{Exported constructors:}}
\newcommand{\currydataconsstop}{\end{itemize}}
\newcommand{\curryconsstart}[2]{\item {\tt #1~::~#2}\pindex{#1}\par}
\newcommand{\curryfunctionstart}[2]{#2\pindex{#1}\begin{quote}}
\newcommand{\curryfunctionstop}{\end{quote}}
\newcommand{\curryfuncsig}[2]{{\tt #1~::~#2}}
\newcommand{\curryfieldstart}[2]{\item {\tt #1~::~#2}\par}
\newcommand{\curryinstancestart}[2]{{\tt #1~::~#2}}
\newcommand{\curryclassstart}[2]{{\tt class }#2\pindex{#1}\begin{quote}}
\newcommand{\curryclassstop}{\end{quote}}
\newcommand{\currydatainstsstart}{\begin{itemize}\item[] \hspace{-4ex}\emph{Known instances:}}
\newcommand{\currydatainstsstop}{\end{itemize}}
\newcommand{\currynoinsts}{}
\newcommand{\currynocons}{\end{quote}}

% for downward compatibility:
\newcommand{\currytype}[3]{{\tt type #2}\pindex{#1} \begin{quote} #3 \end{quote}}
\newcommand{\currydata}[3]{{\tt data #1}\pindex{#1} \begin{quote}#2\end{quote}%
\begin{itemize}\item[] \hspace{-4ex}\emph{Exported constructors:} #3\end{itemize}}
\newcommand{\curryfunction}[3]{#2\pindex{#1}  \begin{quote}#3\end{quote}}
\newcommand{\currycons}[3]{\item {\tt #1~::~#2}\par #3}
\newcommand{\currydatacons}{\end{quote}%
\begin{itemize}\item[] \hspace{-4ex}\emph{Exported constructors:}}
\newcommand{\currydatastop}{\end{itemize}}
\newcommand{\currytypesstart}{\subsubsection*{Exported types:}}
\newcommand{\currytypesstop}{}
\newcommand{\curryfuncstart}{\subsubsection*{Exported functions:}}
\newcommand{\curryfuncstop}{}
\newcommand{\curryclassesstart}{\subsubsection*{Exported typeclasses:}}
\newcommand{\curryclassesstop}{}
