Next: Command_reference Prev: Highlights Up: Top Top: Top
\documentstyle[literate]{report}
\rootsectiontype{\part}
\begin{document}
Here is my \Haskell{} program to send a message to my friends:
\begin{code}
main _ = [ AppendChan stdout (message ++ " to " ++ my_friends) ]
\end{code}
\section[message]{The Message}
\begin{code}
message = "Hello"
\end{code}
\subsection{Comments about the message and its implementation}
\begin{enumerate}
\item
The message is given as a top-level pattern binding.
\item
The @message@ binding does not violate the monomorphic restriction;
its type is \tr{[Char]}, which is not overloaded.
\end{enumerate}
\section[friends]{My friends}
\begin{code}
my_friends = ( \ y -> "Bob and Joe" ) 3
\end{code}
\printindex
\end{document}
Such code is one "kind of stuff" in your literate program; text is the other.