\ProvidesPackage{haskell}

%
% Code support
%

% stop warning from listings when used in article mode
\newcounter{chapter}
\usepackage{listings}
\lstloadlanguages{Haskell}
\lstnewenvironment{code}
    {\lstset{}%
     \csname lst@SetFirstLabel\endcsname}
    {\csname lst@SaveFirstLabel\endcsname}
\lstset{
%  basicstyle=\small,
  basicstyle=\small\ttfamily,
%  keywordstyle=\underbar,
%  identifierstyle=\slshape,
%  commentstyle=\underbar
  flexiblecolumns=false,
  basewidth={0.5em,0.45em},
  literate={-}{{$-$}}1 {+}{{$+$}}1 {/}{{$/$}}1 {*}{{$*$}}1 {=}{{$=$}}1
           {>}{{$>$}}1 {<}{{$<$}}1 
           {->}{{$\rightarrow$}}2 {>=}{{$\geq$}}2 {<-}{{$\leftarrow$}}2
           {<=}{{$\leq$}}2 {=>}{{$\Rightarrow$}}2 {\ .}{{ $\circ$}}2
} 

%
% Page size
%

\usepackage[hmargin={6cm,3cm},vmargin={3cm,1cm},offset=0pt,nohead]{geometry}

%
% Titles, layout etc
%

\usepackage{titlesec}

\titleformat{\part}[frame]
{\normalfont}
{\filright\footnotesize\enspace Andrew Cooke \enspace}
{8pt}
{\Large\bfseries\sffamily\filcenter}
\titlespacing{\part}
{-3cm}{-0.5cm}{5ex}

\titleformat{\section}[leftmargin]
{\large\bfseries\sffamily\filleft}
{}{0pt}{}
\titlespacing{\section}
{3cm}{2.5ex plus .1ex minus .2ex}{1pc}

\titleformat{\subsection}[leftmargin]
{\normalfont\bfseries\sffamily\filleft}
{}{0pt}{}
\titlespacing{\subsection}
{3cm}{1.5ex plus .1ex minus .2ex}{1pc}

\setlength{\parindent 0pt}
\setlength{\parskip 1.5ex plus 0.5ex minus 0.2ex}

%
% eps images
%
\usepackage{graphicx}
