%-*- mode: Latex; abbrev-mode: true; auto-fill-function: do-auto-fill -*-

%% TODO:

\documentclass[11pt,fleqn,oneside]{book} % 
% \documentclass{article}

%% \includeonly{Interlude}

%% \usepackage[pdftex,bookmarks=true]{hyperref}

\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{shading}
\usepackage{enumerate}
% \usepackage{diagrams}

% If using --poly
\usepackage{polytable}
\usepackage{lazylist}

% The (working) code can be extracted from each section via:
% > lhs2TeX --code fileName.lhs > code.hs
%
% Pre-processing of each section for LaTeX should be done via:
% > lhs2TeX --poly fileName.lhs > fileName.tex

% The following should be at the top of each section for lhs2TeX:
% 
%include lhs2TeX.fmt
%include myFormat.fmt

\setlength{\parskip}{0.05in}

% theorem-like environments
\newtheorem{axiom}{Axiom}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{lemma}{Lemma}[section]
% \newtheorem{proof}{Proof}[section]
\newtheorem{example}{Example}[section]
\newtheorem{exercise}{Exercise}[chapter]

\newcommand{\lb}{[\hspace*{-.4 mm}[}
\newcommand{\rb}{]\hspace*{-.4 mm}]}

% new commands used for the index:
\newcommand{\indexwd}[1]{#1\index{#1}}
\newcommand{\indexwdhs}[1]{\ihs{#1}\index{#1@@\protect\ihs{#1}}}
\newcommand{\indexwdkw}[1]{\hkw{#1}\index{#1@@\protect\hkw{#1}}}
\newcommand{\indexhs}[1]{\index{#1@@\protect\ihs{#1}}}
\newcommand{\indexkw}[1]{\index{#1@@\protect\hkw{#1}}}
\newcommand{\indexamb}[2]{\index{#1@@\protect\ihs{#1} (#2)}}

% the following are two hacks because we're no longer using Mark
% Jones' preprocessor
% \newcommand{\ihs}[1]{\hs{#1}}
\newcommand{\ihs}[1]{{\em #1}}
\newcommand{\hkw}[1]{{\bf #1}}

\newcommand{\out}[1]{}
\newcommand{\prh}[1]{{\bf #1}}
\newcommand{\todo}[1]{}
%% \newcommand{\todo}[1]{{\bf [To do:} #1 {\bf ]}}
\newcommand{\note}[1]{\begin{quote} {\footnotesize [\ #1\ ]} \end{quote}}
\newcommand{\ti}[1]{\mathit{#1}}
\newcommand{\red}{\Longrightarrow}
% \newcommand{\And}{\wedge}
% \newcommand{\Or}{\vee}  -- conflicts with defn in polytable.sty

\newcommand{\syn}[1]{\begin{quote} 
                     \parashade[0.9]{roundcorners}{\gdef\outlineboxwidth{.5}
                        {\small\sf {\bf Details:} #1}}
                     \end{quote}}

% \newcounter{calcc}
% \newcommand{\calc}{\addtocounter{calcc}{1}\thecalcc}

\begin{document}

%---------------------------------------------------------------------

\frontmatter

\begin{titlepage}
\vspace*{0.7in}
\fbox{
\begin{minipage}{5in}
\begin{center}
\vspace{.5in}
{\huge\bf The Haskell School of Music}\\[.2in]
{\Large\bf --- From Signals to Symphonies ---}\\[.5in]
{\Large\bf by}\\[.3in]
{\LARGE\bf Paul Hudak}\\[.2in]
{\Large\bf Yale University}\\
{\Large\bf Department of Computer Science}\\[1in]
{\Large\bf Version 1.8}\\[1in]
Copyright \copyright\ Paul Hudak\\
September 2010\\
All rights reserved.  No part of this publication may be reproduced or
distributed in any form or by any means, or stored in a data base or
retrieval system, without the prior written permission of the author.
\vspace{.5in}
\end{center}
\end{minipage}}
\end{titlepage}

\newpage

\tableofcontents

% Preface
\include{Preface}

%---------------------------------------------------------------------

\mainmatter

% An Overview of Computer Music, Euterpea, and Haskell
\include{Intro}

% Simple Music
\include{Music}

% Polymorphic and Higher-order Functions
\include{Poly}

% A Musical Interlude
\include{Interlude}

% Syntactic Magic
\include{Syntax}

% More Music
\include{MoreMusic}

% Interpretation and Performance
\include{Performance}

% Self-Similar Music
\include{SelfSimilar}

% Proof by Induction
\include{Induction}

% An Algebra of Music
\include{Algebra}

% Musical L-Systems
\include{LSystems}

% Qualified Types
\include{Qualified-types}

% Random Numbers, Probability Distributions, and Markov Chains
\include{RandomMusic}

% From Performance to Midi
\include{ToMidi}

% Basic Input/Output
\include{IO}

% Musical User Interface
\include{MUI}

% Sound and Signals
\include{Signals}

% Programming with Streams
% \include{streams}

% Communicating With the Outside World
% \include{ioproc}

% Higher-Order Types
% \include{monads}

% ---------------------------------------------------------------------
% \backmatter

\appendix

% Tour of PreludeList
\include{List-tour}

% A Tour of Haskell's Standard Type Classes
\include{Class-tour}

% Built-In Types Are Not Special
\include{Bitans}

% Pattern-Matching Details
\include{Patterns}

\newpage

% Bibliography
\bibliographystyle{alpha}
\bibliography{HSoM}

% Index
% \printindex

\end{document}
